Thanks to visit codestin.com
Credit goes to doxygen.postgresql.org

PostgreSQL Source Code git master
injection_points.c File Reference
#include "postgres.h"
#include "fmgr.h"
#include "funcapi.h"
#include "injection_stats.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_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
 
bool inj_stats_enabled = 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 40 of file injection_points.c.

◆ INJ_NAME_MAXLEN

#define INJ_NAME_MAXLEN   64

Definition at line 41 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 52 of file injection_points.c.

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

Function Documentation

◆ _PG_init()

void _PG_init ( void  )

Definition at line 589 of file injection_points.c.

590{
592 return;
593
594 DefineCustomBoolVariable("injection_points.stats",
595 "Enables statistics for injection points.",
596 NULL,
598 false,
600 0,
601 NULL,
602 NULL,
603 NULL);
604
605 MarkGUCPrefixReserved("injection_points");
606
607 /* Shared memory initialization */
612
615}
void DefineCustomBoolVariable(const char *name, const char *short_desc, const char *long_desc, bool *valueAddr, bool bootValue, GucContext context, int flags, GucBoolCheckHook check_hook, GucBoolAssignHook assign_hook, GucShowHook show_hook)
Definition: guc.c:5154
void MarkGUCPrefixReserved(const char *className)
Definition: guc.c:5301
@ PGC_POSTMASTER
Definition: guc.h:74
static void injection_shmem_request(void)
bool inj_stats_enabled
static shmem_startup_hook_type prev_shmem_startup_hook
static shmem_request_hook_type prev_shmem_request_hook
static void injection_shmem_startup(void)
void pgstat_register_inj(void)
void pgstat_register_inj_fixed(void)
shmem_startup_hook_type shmem_startup_hook
Definition: ipci.c:58
shmem_request_hook_type shmem_request_hook
Definition: miscinit.c:1789
bool process_shared_preload_libraries_in_progress
Definition: miscinit.c:1786

References DefineCustomBoolVariable(), inj_stats_enabled, injection_shmem_request(), injection_shmem_startup(), MarkGUCPrefixReserved(), PGC_POSTMASTER, pgstat_register_inj(), pgstat_register_inj_fixed(), 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 246 of file injection_points.c.

247{
248 InjectionPointCondition *condition = (InjectionPointCondition *) private_data;
249 char *argstr = (char *) arg;
250
251 if (!injection_point_allowed(condition))
252 return;
253
255
256 if (argstr)
257 elog(ERROR, "error triggered for injection point %s (%s)",
258 name, argstr);
259 else
260 elog(ERROR, "error triggered for injection point %s", name);
261}
#define ERROR
Definition: elog.h:39
#define elog(elevel,...)
Definition: elog.h:226
static bool injection_point_allowed(InjectionPointCondition *condition)
void pgstat_report_inj(const char *name)
void * arg
const char * name

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

◆ injection_init_shmem()

static void injection_init_shmem ( void  )
static

Definition at line 182 of file injection_points.c.

183{
184 bool found;
185
186 if (inj_state != NULL)
187 return;
188
189 inj_state = GetNamedDSMSegment("injection_points",
192 &found);
193}
void * GetNamedDSMSegment(const char *name, size_t size, void(*init_callback)(void *ptr), bool *found)
Definition: dsm_registry.c:185
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 264 of file injection_points.c.

265{
266 InjectionPointCondition *condition = (InjectionPointCondition *) private_data;
267 char *argstr = (char *) arg;
268
269 if (!injection_point_allowed(condition))
270 return;
271
273
274 if (argstr)
275 elog(NOTICE, "notice triggered for injection point %s (%s)",
276 name, argstr);
277 else
278 elog(NOTICE, "notice triggered for injection point %s", name);
279}
#define NOTICE
Definition: elog.h:35

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

◆ injection_point_allowed()

static bool injection_point_allowed ( InjectionPointCondition condition)
static

Definition at line 202 of file injection_points.c.

203{
204 bool result = true;
205
206 switch (condition->type)
207 {
209 if (MyProcPid != condition->pid)
210 result = false;
211 break;
213 break;
214 }
215
216 return result;
217}
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 128 of file injection_points.c.

129{
131
132 SpinLockInit(&state->lock);
133 memset(state->wait_counts, 0, sizeof(state->wait_counts));
134 memset(state->name, 0, sizeof(state->name));
135 ConditionVariableInit(&state->wait_point);
136}
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 352 of file injection_points.c.

353{
356 char *function;
357 InjectionPointCondition condition = {0};
358
359 if (strcmp(action, "error") == 0)
360 function = "injection_error";
361 else if (strcmp(action, "notice") == 0)
362 function = "injection_notice";
363 else if (strcmp(action, "wait") == 0)
364 function = "injection_wait";
365 else
366 elog(ERROR, "incorrect action \"%s\" for injection point creation", action);
367
369 {
370 condition.type = INJ_CONDITION_PID;
371 condition.pid = MyProcPid;
372 }
373
374 pgstat_report_inj_fixed(1, 0, 0, 0, 0);
375 InjectionPointAttach(name, "injection_points", function, &condition,
377
379 {
380 MemoryContext oldctx;
381
382 /* Local injection point, so track it for automated cleanup */
385 MemoryContextSwitchTo(oldctx);
386 }
387
388 /* Add entry for stats */
390
392}
#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
void pgstat_create_inj(const char *name)
void pgstat_report_inj_fixed(uint32 numattach, uint32 numdetach, uint32 numrun, uint32 numcached, uint32 numloaded)
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, pgstat_create_inj(), pgstat_report_inj_fixed(), InjectionPointCondition::pid, pstrdup(), text_to_cstring(), TopMemoryContext, and InjectionPointCondition::type.

◆ injection_points_cached()

Datum injection_points_cached ( PG_FUNCTION_ARGS  )

Definition at line 440 of file injection_points.c.

441{
442 char *name;
443 char *arg = NULL;
444
445 if (PG_ARGISNULL(0))
448
449 if (!PG_ARGISNULL(1))
451
452 pgstat_report_inj_fixed(0, 0, 0, 1, 0);
454
456}
#define PG_ARGISNULL(n)
Definition: fmgr.h:209
#define INJECTION_POINT_CACHED(name, arg)

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

◆ injection_points_cleanup()

static void injection_points_cleanup ( int  code,
Datum  arg 
)
static

Definition at line 224 of file injection_points.c.

225{
226 ListCell *lc;
227
228 /* Leave if nothing is tracked locally */
230 return;
231
232 /* Detach all the local points */
233 foreach(lc, inj_list_local)
234 {
235 char *name = strVal(lfirst(lc));
236
238
239 /* Remove stats entry */
241 }
242}
bool InjectionPointDetach(const char *name)
void pgstat_drop_inj(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, pgstat_drop_inj(), and strVal.

Referenced by injection_points_set_local().

◆ injection_points_detach()

Datum injection_points_detach ( PG_FUNCTION_ARGS  )

Definition at line 525 of file injection_points.c.

526{
528
529 pgstat_report_inj_fixed(0, 1, 0, 0, 0);
531 elog(ERROR, "could not detach injection point \"%s\"", name);
532
533 /* Remove point from local list, if required */
534 if (inj_list_local != NIL)
535 {
536 MemoryContext oldctx;
537
540 MemoryContextSwitchTo(oldctx);
541 }
542
543 /* Remove stats entry */
545
547}
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, pgstat_drop_inj(), pgstat_report_inj_fixed(), text_to_cstring(), and TopMemoryContext.

◆ injection_points_list()

Datum injection_points_list ( PG_FUNCTION_ARGS  )

Definition at line 554 of file injection_points.c.

555{
556#define NUM_INJECTION_POINTS_LIST 3
557 ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
558 List *inj_points;
559 ListCell *lc;
560
561 /* Build a tuplestore to return our results in */
562 InitMaterializedSRF(fcinfo, 0);
563
564 inj_points = InjectionPointList();
565
566 foreach(lc, inj_points)
567 {
569 bool nulls[NUM_INJECTION_POINTS_LIST];
570 InjectionPointData *inj_point = lfirst(lc);
571
572 memset(values, 0, sizeof(values));
573 memset(nulls, 0, sizeof(nulls));
574
575 values[0] = PointerGetDatum(cstring_to_text(inj_point->name));
578
579 /* shove row into tuplestore */
580 tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, values, nulls);
581 }
582
583 return (Datum) 0;
584#undef NUM_INJECTION_POINTS_LIST
585}
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 399 of file injection_points.c.

400{
402
403 if (inj_state == NULL)
405
406 pgstat_report_inj_fixed(0, 0, 0, 0, 1);
408
410}
#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, pgstat_report_inj_fixed(), and text_to_cstring().

◆ injection_points_run()

Datum injection_points_run ( PG_FUNCTION_ARGS  )

Definition at line 417 of file injection_points.c.

418{
419 char *name;
420 char *arg = NULL;
421
422 if (PG_ARGISNULL(0))
425
426 if (!PG_ARGISNULL(1))
428
429 pgstat_report_inj_fixed(0, 0, 1, 0, 0);
431
433}
#define INJECTION_POINT(name, arg)

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

◆ injection_points_set_local()

Datum injection_points_set_local ( PG_FUNCTION_ARGS  )

Definition at line 503 of file injection_points.c.

504{
505 /* Enable flag to add a runtime condition based on this process ID */
507
508 if (inj_state == NULL)
510
511 /*
512 * Register a before_shmem_exit callback to remove any injection points
513 * linked to this process.
514 */
516
518}
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 463 of file injection_points.c.

464{
466 int index = -1;
467
468 if (inj_state == NULL)
470
471 /* First bump the wait counter for the injection point to wake up */
473 for (int i = 0; i < INJ_MAX_WAIT; i++)
474 {
475 if (strcmp(name, inj_state->name[i]) == 0)
476 {
477 index = i;
478 break;
479 }
480 }
481 if (index < 0)
482 {
484 elog(ERROR, "could not find injection point %s to wake up", name);
485 }
488
489 /* And broadcast the change to the waiters */
492}
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 140 of file injection_points.c.

141{
142 Size size;
143
146
147 size = MAXALIGN(sizeof(InjectionPointSharedState));
149}
#define MAXALIGN(LEN)
Definition: c.h:811
size_t Size
Definition: c.h:611
void RequestAddinShmemSpace(Size size)
Definition: ipci.c:74

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 152 of file injection_points.c.

153{
154 bool found;
155
158
159 /* Create or attach to the shared memory state */
160 LWLockAcquire(AddinShmemInitLock, LW_EXCLUSIVE);
161
162 inj_state = ShmemInitStruct("injection_points",
164 &found);
165
166 if (!found)
167 {
168 /*
169 * First time through, so initialize. This is shared with the dynamic
170 * initialization using a DSM.
171 */
173 }
174
175 LWLockRelease(AddinShmemInitLock);
176}
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:387

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 283 of file injection_points.c.

284{
285 uint32 old_wait_counts = 0;
286 int index = -1;
287 uint32 injection_wait_event = 0;
288 InjectionPointCondition *condition = (InjectionPointCondition *) private_data;
289
290 if (inj_state == NULL)
292
293 if (!injection_point_allowed(condition))
294 return;
295
297
298 /*
299 * Use the injection point name for this custom wait event. Note that
300 * this custom wait event name is not released, but we don't care much for
301 * testing as this should be short-lived.
302 */
303 injection_wait_event = WaitEventInjectionPointNew(name);
304
305 /*
306 * Find a free slot to wait for, and register this injection point's name.
307 */
309 for (int i = 0; i < INJ_MAX_WAIT; i++)
310 {
311 if (inj_state->name[i][0] == '\0')
312 {
313 index = i;
315 old_wait_counts = inj_state->wait_counts[i];
316 break;
317 }
318 }
320
321 if (index < 0)
322 elog(ERROR, "could not find free slot for wait of injection point %s ",
323 name);
324
325 /* And sleep.. */
327 for (;;)
328 {
329 uint32 new_wait_counts;
330
332 new_wait_counts = inj_state->wait_counts[index];
334
335 if (old_wait_counts != new_wait_counts)
336 break;
337 ConditionVariableSleep(&inj_state->wait_point, injection_wait_event);
338 }
340
341 /* Remove this injection point from the waiters. */
343 inj_state->name[index][0] = '\0';
345}
uint32_t uint32
Definition: c.h:539
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, pgstat_report_inj(), SpinLockAcquire, SpinLockRelease, strlcpy(), InjectionPointSharedState::wait_counts, InjectionPointSharedState::wait_point, and WaitEventInjectionPointNew().

◆ PG_FUNCTION_INFO_V1() [1/8]

PG_FUNCTION_INFO_V1 ( injection_points_attach  )

◆ PG_FUNCTION_INFO_V1() [2/8]

PG_FUNCTION_INFO_V1 ( injection_points_cached  )

◆ PG_FUNCTION_INFO_V1() [3/8]

PG_FUNCTION_INFO_V1 ( injection_points_detach  )

◆ PG_FUNCTION_INFO_V1() [4/8]

PG_FUNCTION_INFO_V1 ( injection_points_list  )

◆ PG_FUNCTION_INFO_V1() [5/8]

PG_FUNCTION_INFO_V1 ( injection_points_load  )

◆ PG_FUNCTION_INFO_V1() [6/8]

PG_FUNCTION_INFO_V1 ( injection_points_run  )

◆ PG_FUNCTION_INFO_V1() [7/8]

PG_FUNCTION_INFO_V1 ( injection_points_set_local  )

◆ PG_FUNCTION_INFO_V1() [8/8]

PG_FUNCTION_INFO_V1 ( injection_points_wakeup  )

Variable Documentation

◆ inj_list_local

List* inj_list_local = NIL
static

◆ inj_state

◆ inj_stats_enabled

◆ injection_point_local

bool injection_point_local = false
static

◆ PG_MODULE_MAGIC

PG_MODULE_MAGIC

Definition at line 37 of file injection_points.c.

◆ prev_shmem_request_hook

shmem_request_hook_type prev_shmem_request_hook = NULL
static

Definition at line 120 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 121 of file injection_points.c.

Referenced by _PG_init(), and injection_shmem_startup().