diff options
Diffstat (limited to 'src/include/utils/wait_event.h')
-rw-r--r-- | src/include/utils/wait_event.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/include/utils/wait_event.h b/src/include/utils/wait_event.h index 1b735d4a0e7..9f18a753d47 100644 --- a/src/include/utils/wait_event.h +++ b/src/include/utils/wait_event.h @@ -24,6 +24,7 @@ #define PG_WAIT_IPC 0x08000000U #define PG_WAIT_TIMEOUT 0x09000000U #define PG_WAIT_IO 0x0A000000U +#define PG_WAIT_INJECTIONPOINT 0x0B000000U /* enums for wait events */ #include "utils/wait_event_types.h" @@ -38,26 +39,28 @@ extern void pgstat_reset_wait_event_storage(void); extern PGDLLIMPORT uint32 *my_wait_event_info; -/* ---------- - * Wait Events - Extension +/* + * Wait Events - Extension, InjectionPoint * - * Use this category when the server process is waiting for some condition - * defined by an extension module. + * Use InjectionPoint when the server process is waiting in an injection + * point. Use Extension for other cases of the server process waiting for + * some condition defined by an extension module. * - * Extensions can define their own wait events in this category. They should - * call WaitEventExtensionNew() with a wait event string. If the wait event - * associated to a string is already allocated, it returns the wait event - * information to use. If not, it gets one wait event ID allocated from + * Extensions can define their own wait events in these categories. They + * should call one of these functions with a wait event string. If the wait + * event associated to a string is already allocated, it returns the wait + * event information to use. If not, it gets one wait event ID allocated from * a shared counter, associates the string to the ID in the shared dynamic * hash and returns the wait event information. * * The ID retrieved can be used with pgstat_report_wait_start() or equivalent. */ -extern void WaitEventExtensionShmemInit(void); -extern Size WaitEventExtensionShmemSize(void); - extern uint32 WaitEventExtensionNew(const char *wait_event_name); -extern char **GetWaitEventExtensionNames(int *nwaitevents); +extern uint32 WaitEventInjectionPointNew(const char *wait_event_name); + +extern void WaitEventCustomShmemInit(void); +extern Size WaitEventCustomShmemSize(void); +extern char **GetWaitEventCustomNames(uint32 classId, int *nwaitevents); /* ---------- * pgstat_report_wait_start() - |