PostgreSQL Source Code git master
injection_points.c File Reference
#include "postgres.h"
#include "fmgr.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "nodes/pg_list.h"
#include "nodes/value.h"
#include "storage/condition_variable.h"
#include "storage/dsm_registry.h"
#include "storage/ipc.h"
#include "storage/lwlock.h"
#include "storage/shmem.h"
#include "utils/builtins.h"
#include "utils/guc.h"
#include "utils/injection_point.h"
#include "utils/memutils.h"
#include "utils/wait_event.h"
Include dependency graph for injection_points.c:

Go to the source code of this file.

Data Structures

struct  InjectionPointCondition
 
struct  InjectionPointSharedState
 

Macros

#define INJ_MAX_WAIT   8
 
#define INJ_NAME_MAXLEN   64
 
#define NUM_INJECTION_POINTS_LIST   3
 

Typedefs

typedef enum InjectionPointConditionType InjectionPointConditionType
 
typedef struct InjectionPointCondition InjectionPointCondition
 
typedef struct InjectionPointSharedState InjectionPointSharedState
 

Enumerations

enum  InjectionPointConditionType { INJ_CONDITION_ALWAYS = 0 , INJ_CONDITION_PID }
 

Functions

PGDLLEXPORT void injection_error (const char *name, const void *private_data, void *arg)
 
PGDLLEXPORT void injection_notice (const char *name, const void *private_data, void *arg)
 
PGDLLEXPORT void injection_wait (const char *name, const void *private_data, void *arg)
 
static void injection_point_init_state (void *ptr)
 
static void injection_shmem_request (void)
 
static void injection_shmem_startup (void)
 
static void injection_init_shmem (void)
 
static bool injection_point_allowed (InjectionPointCondition *condition)
 
static void injection_points_cleanup (int code, Datum arg)
 
 PG_FUNCTION_INFO_V1 (injection_points_attach)
 
Datum injection_points_attach (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (injection_points_attach_func)
 
Datum injection_points_attach_func (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (injection_points_load)
 
Datum injection_points_load (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (injection_points_run)
 
Datum injection_points_run (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (injection_points_cached)
 
Datum injection_points_cached (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (injection_points_wakeup)
 
Datum injection_points_wakeup (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (injection_points_set_local)
 
Datum injection_points_set_local (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (injection_points_detach)
 
Datum injection_points_detach (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (injection_points_list)
 
Datum injection_points_list (PG_FUNCTION_ARGS)
 
void _PG_init (void)
 

Variables

 PG_MODULE_MAGIC
 
static Listinj_list_local = NIL
 
static InjectionPointSharedStateinj_state = NULL
 
static bool injection_point_local = false
 
static shmem_request_hook_type prev_shmem_request_hook = NULL
 
static shmem_startup_hook_type prev_shmem_startup_hook = NULL
 

Macro Definition Documentation

◆ INJ_MAX_WAIT

#define INJ_MAX_WAIT   8

Definition at line 39 of file injection_points.c.

◆ INJ_NAME_MAXLEN

#define INJ_NAME_MAXLEN   64

Definition at line 40 of file injection_points.c.

◆ NUM_INJECTION_POINTS_LIST

#define NUM_INJECTION_POINTS_LIST   3

Typedef Documentation

◆ InjectionPointCondition

◆ InjectionPointConditionType

◆ InjectionPointSharedState

Enumeration Type Documentation

◆ InjectionPointConditionType

Enumerator
INJ_CONDITION_ALWAYS 
INJ_CONDITION_PID 

Definition at line 51 of file injection_points.c.

52{
53 INJ_CONDITION_ALWAYS = 0, /* always run */
54 INJ_CONDITION_PID, /* PID restriction */
InjectionPointConditionType
@ INJ_CONDITION_PID
@ INJ_CONDITION_ALWAYS

Function Documentation

◆ _PG_init()

void _PG_init ( void  )

Definition at line 598 of file injection_points.c.

599{
601 return;
602
603 /* Shared memory initialization */
608}
static void injection_shmem_request(void)
static shmem_startup_hook_type prev_shmem_startup_hook
static shmem_request_hook_type prev_shmem_request_hook
static void injection_shmem_startup(void)
shmem_startup_hook_type shmem_startup_hook
Definition: ipci.c:59
shmem_request_hook_type shmem_request_hook
Definition: miscinit.c:1789
bool process_shared_preload_libraries_in_progress
Definition: miscinit.c:1786

References injection_shmem_request(), injection_shmem_startup(), prev_shmem_request_hook, prev_shmem_startup_hook, process_shared_preload_libraries_in_progress, shmem_request_hook, and shmem_startup_hook.

◆ injection_error()

void injection_error ( const char *  name,
const void *  private_data,
void *  arg 
)

Definition at line 233 of file injection_points.c.

234{
235 InjectionPointCondition *condition = (InjectionPointCondition *) private_data;
236 char *argstr = (char *) arg;
237
238 if (!injection_point_allowed(condition))
239 return;
240
241 if (argstr)
242 elog(ERROR, "error triggered for injection point %s (%s)",
243 name, argstr);
244 else
245 elog(ERROR, "error triggered for injection point %s", name);
246}
#define ERROR
Definition: elog.h:39
#define elog(elevel,...)
Definition: elog.h:226
static bool injection_point_allowed(InjectionPointCondition *condition)
void * arg
const char * name

References arg, elog, ERROR, injection_point_allowed(), and name.

◆ injection_init_shmem()

static void injection_init_shmem ( void  )
static

Definition at line 172 of file injection_points.c.

173{
174 bool found;
175
176 if (inj_state != NULL)
177 return;
178
179 inj_state = GetNamedDSMSegment("injection_points",
182 &found);
183}
void * GetNamedDSMSegment(const char *name, size_t size, void(*init_callback)(void *ptr), bool *found)
Definition: dsm_registry.c:186
static void injection_point_init_state(void *ptr)
static InjectionPointSharedState * inj_state

References GetNamedDSMSegment(), inj_state, and injection_point_init_state().

Referenced by injection_points_load(), injection_points_set_local(), injection_points_wakeup(), and injection_wait().

◆ injection_notice()

void injection_notice ( const char *  name,
const void *  private_data,
void *  arg 
)

Definition at line 249 of file injection_points.c.

250{
251 InjectionPointCondition *condition = (InjectionPointCondition *) private_data;
252 char *argstr = (char *) arg;
253
254 if (!injection_point_allowed(condition))
255 return;
256
257 if (argstr)
258 elog(NOTICE, "notice triggered for injection point %s (%s)",
259 name, argstr);
260 else
261 elog(NOTICE, "notice triggered for injection point %s", name);
262}
#define NOTICE
Definition: elog.h:35

References arg, elog, injection_point_allowed(), name, and NOTICE.

◆ injection_point_allowed()

static bool injection_point_allowed ( InjectionPointCondition condition)
static

Definition at line 192 of file injection_points.c.

193{
194 bool result = true;
195
196 switch (condition->type)
197 {
199 if (MyProcPid != condition->pid)
200 result = false;
201 break;
203 break;
204 }
205
206 return result;
207}
int MyProcPid
Definition: globals.c:47
InjectionPointConditionType type

References INJ_CONDITION_ALWAYS, INJ_CONDITION_PID, MyProcPid, InjectionPointCondition::pid, and InjectionPointCondition::type.

Referenced by injection_error(), injection_notice(), and injection_wait().

◆ injection_point_init_state()

static void injection_point_init_state ( void *  ptr)
static

Definition at line 118 of file injection_points.c.

119{
121
122 SpinLockInit(&state->lock);
123 memset(state->wait_counts, 0, sizeof(state->wait_counts));
124 memset(state->name, 0, sizeof(state->name));
125 ConditionVariableInit(&state->wait_point);
126}
void ConditionVariableInit(ConditionVariable *cv)
#define SpinLockInit(lock)
Definition: spin.h:57
Definition: regguts.h:323

References ConditionVariableInit(), and SpinLockInit.

Referenced by injection_init_shmem(), and injection_shmem_startup().

◆ injection_points_attach()

Datum injection_points_attach ( PG_FUNCTION_ARGS  )

Definition at line 333 of file injection_points.c.

334{
337 char *function;
338 InjectionPointCondition condition = {0};
339
340 if (strcmp(action, "error") == 0)
341 function = "injection_error";
342 else if (strcmp(action, "notice") == 0)
343 function = "injection_notice";
344 else if (strcmp(action, "wait") == 0)
345 function = "injection_wait";
346 else
347 elog(ERROR, "incorrect action \"%s\" for injection point creation", action);
348
350 {
351 condition.type = INJ_CONDITION_PID;
352 condition.pid = MyProcPid;
353 }
354
355 InjectionPointAttach(name, "injection_points", function, &condition,
357
359 {
360 MemoryContext oldctx;
361
362 /* Local injection point, so track it for automated cleanup */
365 MemoryContextSwitchTo(oldctx);
366 }
367
369}
#define PG_RETURN_VOID()
Definition: fmgr.h:349
#define PG_GETARG_TEXT_PP(n)
Definition: fmgr.h:309
void InjectionPointAttach(const char *name, const char *library, const char *function, const void *private_data, int private_data_size)
static bool injection_point_local
static List * inj_list_local
List * lappend(List *list, void *datum)
Definition: list.c:339
char * pstrdup(const char *in)
Definition: mcxt.c:1759
MemoryContext TopMemoryContext
Definition: mcxt.c:166
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:124
on_exit_nicely_callback function
String * makeString(char *str)
Definition: value.c:63
char * text_to_cstring(const text *t)
Definition: varlena.c:214

References generate_unaccent_rules::action, elog, ERROR, function, INJ_CONDITION_PID, inj_list_local, injection_point_local, InjectionPointAttach(), lappend(), makeString(), MemoryContextSwitchTo(), MyProcPid, name, PG_GETARG_TEXT_PP, PG_RETURN_VOID, InjectionPointCondition::pid, pstrdup(), text_to_cstring(), TopMemoryContext, and InjectionPointCondition::type.

◆ injection_points_attach_func()

Datum injection_points_attach_func ( PG_FUNCTION_ARGS  )

Definition at line 377 of file injection_points.c.

378{
379 char *name;
380 char *lib_name;
381 char *function;
382 bytea *private_data = NULL;
383 int private_data_size = 0;
384
385 if (PG_ARGISNULL(0))
386 elog(ERROR, "injection point name cannot be NULL");
387 if (PG_ARGISNULL(1))
388 elog(ERROR, "injection point library cannot be NULL");
389 if (PG_ARGISNULL(2))
390 elog(ERROR, "injection point function cannot be NULL");
391
393 lib_name = text_to_cstring(PG_GETARG_TEXT_PP(1));
395
396 if (!PG_ARGISNULL(3))
397 {
398 private_data = PG_GETARG_BYTEA_PP(3);
399 private_data_size = VARSIZE_ANY_EXHDR(private_data);
400 }
401
402 if (private_data != NULL)
403 InjectionPointAttach(name, lib_name, function, VARDATA_ANY(private_data),
404 private_data_size);
405 else
406 InjectionPointAttach(name, lib_name, function, NULL,
407 0);
409}
#define PG_GETARG_BYTEA_PP(n)
Definition: fmgr.h:308
#define PG_ARGISNULL(n)
Definition: fmgr.h:209
Definition: c.h:706
static Size VARSIZE_ANY_EXHDR(const void *PTR)
Definition: varatt.h:472
static char * VARDATA_ANY(const void *PTR)
Definition: varatt.h:486

References elog, ERROR, function, InjectionPointAttach(), name, PG_ARGISNULL, PG_GETARG_BYTEA_PP, PG_GETARG_TEXT_PP, PG_RETURN_VOID, text_to_cstring(), VARDATA_ANY(), and VARSIZE_ANY_EXHDR().

◆ injection_points_cached()

Datum injection_points_cached ( PG_FUNCTION_ARGS  )

Definition at line 455 of file injection_points.c.

456{
457 char *name;
458 char *arg = NULL;
459
460 if (PG_ARGISNULL(0))
463
464 if (!PG_ARGISNULL(1))
466
468
470}
#define INJECTION_POINT_CACHED(name, arg)

References arg, INJECTION_POINT_CACHED, name, PG_ARGISNULL, PG_GETARG_TEXT_PP, PG_RETURN_VOID, and text_to_cstring().

◆ injection_points_cleanup()

static void injection_points_cleanup ( int  code,
Datum  arg 
)
static

Definition at line 214 of file injection_points.c.

215{
216 ListCell *lc;
217
218 /* Leave if nothing is tracked locally */
220 return;
221
222 /* Detach all the local points */
223 foreach(lc, inj_list_local)
224 {
225 char *name = strVal(lfirst(lc));
226
228 }
229}
bool InjectionPointDetach(const char *name)
#define lfirst(lc)
Definition: pg_list.h:172
#define strVal(v)
Definition: value.h:82

References inj_list_local, injection_point_local, InjectionPointDetach(), lfirst, name, and strVal.

Referenced by injection_points_set_local().

◆ injection_points_detach()

Datum injection_points_detach ( PG_FUNCTION_ARGS  )

Definition at line 539 of file injection_points.c.

540{
542
544 elog(ERROR, "could not detach injection point \"%s\"", name);
545
546 /* Remove point from local list, if required */
547 if (inj_list_local != NIL)
548 {
549 MemoryContext oldctx;
550
553 MemoryContextSwitchTo(oldctx);
554 }
555
557}
List * list_delete(List *list, void *datum)
Definition: list.c:853
#define NIL
Definition: pg_list.h:68

References elog, ERROR, inj_list_local, InjectionPointDetach(), list_delete(), makeString(), MemoryContextSwitchTo(), name, NIL, PG_GETARG_TEXT_PP, PG_RETURN_VOID, text_to_cstring(), and TopMemoryContext.

◆ injection_points_list()

Datum injection_points_list ( PG_FUNCTION_ARGS  )

Definition at line 564 of file injection_points.c.

565{
566#define NUM_INJECTION_POINTS_LIST 3
567 ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
568 List *inj_points;
569 ListCell *lc;
570
571 /* Build a tuplestore to return our results in */
572 InitMaterializedSRF(fcinfo, 0);
573
574 inj_points = InjectionPointList();
575
576 foreach(lc, inj_points)
577 {
579 bool nulls[NUM_INJECTION_POINTS_LIST];
580 InjectionPointData *inj_point = lfirst(lc);
581
582 memset(values, 0, sizeof(values));
583 memset(nulls, 0, sizeof(nulls));
584
585 values[0] = PointerGetDatum(cstring_to_text(inj_point->name));
588
589 /* shove row into tuplestore */
590 tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, values, nulls);
591 }
592
593 return (Datum) 0;
594#undef NUM_INJECTION_POINTS_LIST
595}
static Datum values[MAXATTR]
Definition: bootstrap.c:153
void InitMaterializedSRF(FunctionCallInfo fcinfo, bits32 flags)
Definition: funcapi.c:76
List * InjectionPointList(void)
#define NUM_INJECTION_POINTS_LIST
static Datum PointerGetDatum(const void *X)
Definition: postgres.h:332
uint64_t Datum
Definition: postgres.h:70
const char * library
const char * function
Definition: pg_list.h:54
TupleDesc setDesc
Definition: execnodes.h:364
Tuplestorestate * setResult
Definition: execnodes.h:363
void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc, const Datum *values, const bool *isnull)
Definition: tuplestore.c:784
text * cstring_to_text(const char *s)
Definition: varlena.c:181

References cstring_to_text(), InjectionPointData::function, InitMaterializedSRF(), InjectionPointList(), lfirst, InjectionPointData::library, InjectionPointData::name, NUM_INJECTION_POINTS_LIST, PointerGetDatum(), ReturnSetInfo::setDesc, ReturnSetInfo::setResult, tuplestore_putvalues(), and values.

◆ injection_points_load()

Datum injection_points_load ( PG_FUNCTION_ARGS  )

Definition at line 416 of file injection_points.c.

417{
419
420 if (inj_state == NULL)
422
424
426}
#define INJECTION_POINT_LOAD(name)
static void injection_init_shmem(void)

References inj_state, injection_init_shmem(), INJECTION_POINT_LOAD, name, PG_GETARG_TEXT_PP, PG_RETURN_VOID, and text_to_cstring().

◆ injection_points_run()

Datum injection_points_run ( PG_FUNCTION_ARGS  )

Definition at line 433 of file injection_points.c.

434{
435 char *name;
436 char *arg = NULL;
437
438 if (PG_ARGISNULL(0))
441
442 if (!PG_ARGISNULL(1))
444
446
448}
#define INJECTION_POINT(name, arg)

References arg, INJECTION_POINT, name, PG_ARGISNULL, PG_GETARG_TEXT_PP, PG_RETURN_VOID, and text_to_cstring().

◆ injection_points_set_local()

Datum injection_points_set_local ( PG_FUNCTION_ARGS  )

Definition at line 517 of file injection_points.c.

518{
519 /* Enable flag to add a runtime condition based on this process ID */
521
522 if (inj_state == NULL)
524
525 /*
526 * Register a before_shmem_exit callback to remove any injection points
527 * linked to this process.
528 */
530
532}
static void injection_points_cleanup(int code, Datum arg)
void before_shmem_exit(pg_on_exit_callback function, Datum arg)
Definition: ipc.c:337

References before_shmem_exit(), inj_state, injection_init_shmem(), injection_point_local, injection_points_cleanup(), and PG_RETURN_VOID.

◆ injection_points_wakeup()

Datum injection_points_wakeup ( PG_FUNCTION_ARGS  )

Definition at line 477 of file injection_points.c.

478{
480 int index = -1;
481
482 if (inj_state == NULL)
484
485 /* First bump the wait counter for the injection point to wake up */
487 for (int i = 0; i < INJ_MAX_WAIT; i++)
488 {
489 if (strcmp(name, inj_state->name[i]) == 0)
490 {
491 index = i;
492 break;
493 }
494 }
495 if (index < 0)
496 {
498 elog(ERROR, "could not find injection point %s to wake up", name);
499 }
502
503 /* And broadcast the change to the waiters */
506}
void ConditionVariableBroadcast(ConditionVariable *cv)
#define INJ_MAX_WAIT
int i
Definition: isn.c:77
#define SpinLockRelease(lock)
Definition: spin.h:61
#define SpinLockAcquire(lock)
Definition: spin.h:59
uint32 wait_counts[INJ_MAX_WAIT]
char name[INJ_MAX_WAIT][INJ_NAME_MAXLEN]
ConditionVariable wait_point
Definition: type.h:96

References ConditionVariableBroadcast(), elog, ERROR, i, INJ_MAX_WAIT, inj_state, injection_init_shmem(), InjectionPointSharedState::lock, name, InjectionPointSharedState::name, PG_GETARG_TEXT_PP, PG_RETURN_VOID, SpinLockAcquire, SpinLockRelease, text_to_cstring(), InjectionPointSharedState::wait_counts, and InjectionPointSharedState::wait_point.

◆ injection_shmem_request()

static void injection_shmem_request ( void  )
static

Definition at line 130 of file injection_points.c.

131{
132 Size size;
133
136
137 size = MAXALIGN(sizeof(InjectionPointSharedState));
139}
#define MAXALIGN(LEN)
Definition: c.h:824
size_t Size
Definition: c.h:624
void RequestAddinShmemSpace(Size size)
Definition: ipci.c:75

References MAXALIGN, prev_shmem_request_hook, and RequestAddinShmemSpace().

Referenced by _PG_init().

◆ injection_shmem_startup()

static void injection_shmem_startup ( void  )
static

Definition at line 142 of file injection_points.c.

143{
144 bool found;
145
148
149 /* Create or attach to the shared memory state */
150 LWLockAcquire(AddinShmemInitLock, LW_EXCLUSIVE);
151
152 inj_state = ShmemInitStruct("injection_points",
154 &found);
155
156 if (!found)
157 {
158 /*
159 * First time through, so initialize. This is shared with the dynamic
160 * initialization using a DSM.
161 */
163 }
164
165 LWLockRelease(AddinShmemInitLock);
166}
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
Definition: lwlock.c:1174
void LWLockRelease(LWLock *lock)
Definition: lwlock.c:1894
@ LW_EXCLUSIVE
Definition: lwlock.h:112
void * ShmemInitStruct(const char *name, Size size, bool *foundPtr)
Definition: shmem.c:389

References inj_state, injection_point_init_state(), LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), prev_shmem_startup_hook, and ShmemInitStruct().

Referenced by _PG_init().

◆ injection_wait()

void injection_wait ( const char *  name,
const void *  private_data,
void *  arg 
)

Definition at line 266 of file injection_points.c.

267{
268 uint32 old_wait_counts = 0;
269 int index = -1;
270 uint32 injection_wait_event = 0;
271 InjectionPointCondition *condition = (InjectionPointCondition *) private_data;
272
273 if (inj_state == NULL)
275
276 if (!injection_point_allowed(condition))
277 return;
278
279 /*
280 * Use the injection point name for this custom wait event. Note that
281 * this custom wait event name is not released, but we don't care much for
282 * testing as this should be short-lived.
283 */
284 injection_wait_event = WaitEventInjectionPointNew(name);
285
286 /*
287 * Find a free slot to wait for, and register this injection point's name.
288 */
290 for (int i = 0; i < INJ_MAX_WAIT; i++)
291 {
292 if (inj_state->name[i][0] == '\0')
293 {
294 index = i;
296 old_wait_counts = inj_state->wait_counts[i];
297 break;
298 }
299 }
301
302 if (index < 0)
303 elog(ERROR, "could not find free slot for wait of injection point %s ",
304 name);
305
306 /* And sleep.. */
308 for (;;)
309 {
310 uint32 new_wait_counts;
311
313 new_wait_counts = inj_state->wait_counts[index];
315
316 if (old_wait_counts != new_wait_counts)
317 break;
318 ConditionVariableSleep(&inj_state->wait_point, injection_wait_event);
319 }
321
322 /* Remove this injection point from the waiters. */
324 inj_state->name[index][0] = '\0';
326}
uint32_t uint32
Definition: c.h:552
bool ConditionVariableCancelSleep(void)
void ConditionVariablePrepareToSleep(ConditionVariable *cv)
void ConditionVariableSleep(ConditionVariable *cv, uint32 wait_event_info)
#define INJ_NAME_MAXLEN
size_t strlcpy(char *dst, const char *src, size_t siz)
Definition: strlcpy.c:45
uint32 WaitEventInjectionPointNew(const char *wait_event_name)
Definition: wait_event.c:169

References ConditionVariableCancelSleep(), ConditionVariablePrepareToSleep(), ConditionVariableSleep(), elog, ERROR, i, INJ_MAX_WAIT, INJ_NAME_MAXLEN, inj_state, injection_init_shmem(), injection_point_allowed(), InjectionPointSharedState::lock, name, InjectionPointSharedState::name, SpinLockAcquire, SpinLockRelease, strlcpy(), InjectionPointSharedState::wait_counts, InjectionPointSharedState::wait_point, and WaitEventInjectionPointNew().

◆ PG_FUNCTION_INFO_V1() [1/9]

PG_FUNCTION_INFO_V1 ( injection_points_attach  )

◆ PG_FUNCTION_INFO_V1() [2/9]

PG_FUNCTION_INFO_V1 ( injection_points_attach_func  )

◆ PG_FUNCTION_INFO_V1() [3/9]

PG_FUNCTION_INFO_V1 ( injection_points_cached  )

◆ PG_FUNCTION_INFO_V1() [4/9]

PG_FUNCTION_INFO_V1 ( injection_points_detach  )

◆ PG_FUNCTION_INFO_V1() [5/9]

PG_FUNCTION_INFO_V1 ( injection_points_list  )

◆ PG_FUNCTION_INFO_V1() [6/9]

PG_FUNCTION_INFO_V1 ( injection_points_load  )

◆ PG_FUNCTION_INFO_V1() [7/9]

PG_FUNCTION_INFO_V1 ( injection_points_run  )

◆ PG_FUNCTION_INFO_V1() [8/9]

PG_FUNCTION_INFO_V1 ( injection_points_set_local  )

◆ PG_FUNCTION_INFO_V1() [9/9]

PG_FUNCTION_INFO_V1 ( injection_points_wakeup  )

Variable Documentation

◆ inj_list_local

List* inj_list_local = NIL
static

◆ inj_state

◆ injection_point_local

bool injection_point_local = false
static

◆ PG_MODULE_MAGIC

PG_MODULE_MAGIC

Definition at line 36 of file injection_points.c.

◆ prev_shmem_request_hook

shmem_request_hook_type prev_shmem_request_hook = NULL
static

Definition at line 110 of file injection_points.c.

Referenced by _PG_init(), and injection_shmem_request().

◆ prev_shmem_startup_hook

shmem_startup_hook_type prev_shmem_startup_hook = NULL
static

Definition at line 111 of file injection_points.c.

Referenced by _PG_init(), and injection_shmem_startup().