Add InjectionPointList() to retrieve list of injection points
authorMichael Paquier <michael@paquier.xyz>
Wed, 2 Jul 2025 23:41:25 +0000 (08:41 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 2 Jul 2025 23:41:25 +0000 (08:41 +0900)
commit7b2eb72b1b8ce4279e42848a3978e781ae239355
treedd2b6b9b36b2d64699319ee792df727e7a2d2cc6
parentfe05430ace8e0b3c945cf581564458a5983a07b6
Add InjectionPointList() to retrieve list of injection points

This routine has come as a useful piece to be able to know the list of
injection points currently attached in a system.  One area would be to
use it in a set-returning function, or just let out-of-core code play
with it.

This hides the internals of the shared memory array lookup holding the
information about the injection points (point name, library and function
name), allocating the result in a palloc'd List consumable by the
caller.

Reviewed-by: Jeff Davis <pgsql@j-davis.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Rahila Syed <rahilasyed90@gmail.com>
Discussion: https://postgr.es/m/Z_xYkA21KyLEHvWR@paquier.xyz
Discussion: https://postgr.es/m/aBG2rPwl3GE7m1-Q@paquier.xyz
src/backend/utils/misc/injection_point.c
src/include/utils/injection_point.h
src/tools/pgindent/typedefs.list