PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
wait_event.c File Reference
#include "postgres.h"
#include "storage/lmgr.h"
#include "storage/lwlock.h"
#include "storage/spin.h"
#include "utils/wait_event.h"
#include "pgstat_wait_event.c"
Include dependency graph for wait_event.c:

Go to the source code of this file.

Data Structures

struct  WaitEventCustomEntryByInfo
 
struct  WaitEventCustomEntryByName
 
struct  WaitEventCustomCounterData
 

Macros

#define WAIT_EVENT_CLASS_MASK   0xFF000000
 
#define WAIT_EVENT_ID_MASK   0x0000FFFF
 
#define WAIT_EVENT_CUSTOM_HASH_INIT_SIZE   16
 
#define WAIT_EVENT_CUSTOM_HASH_MAX_SIZE   128
 
#define WAIT_EVENT_CUSTOM_INITIAL_ID   1
 

Typedefs

typedef struct WaitEventCustomEntryByInfo WaitEventCustomEntryByInfo
 
typedef struct WaitEventCustomEntryByName WaitEventCustomEntryByName
 
typedef struct WaitEventCustomCounterData WaitEventCustomCounterData
 

Functions

static const char * pgstat_get_wait_activity (WaitEventActivity w)
 
static const char * pgstat_get_wait_bufferpin (WaitEventBufferPin w)
 
static const char * pgstat_get_wait_client (WaitEventClient w)
 
static const char * pgstat_get_wait_ipc (WaitEventIPC w)
 
static const char * pgstat_get_wait_timeout (WaitEventTimeout w)
 
static const char * pgstat_get_wait_io (WaitEventIO w)
 
static uint32 WaitEventCustomNew (uint32 classId, const char *wait_event_name)
 
static const char * GetWaitEventCustomIdentifier (uint32 wait_event_info)
 
Size WaitEventCustomShmemSize (void)
 
void WaitEventCustomShmemInit (void)
 
uint32 WaitEventExtensionNew (const char *wait_event_name)
 
uint32 WaitEventInjectionPointNew (const char *wait_event_name)
 
char ** GetWaitEventCustomNames (uint32 classId, int *nwaitevents)
 
void pgstat_set_wait_event_storage (uint32 *wait_event_info)
 
void pgstat_reset_wait_event_storage (void)
 
const char * pgstat_get_wait_event_type (uint32 wait_event_info)
 
const char * pgstat_get_wait_event (uint32 wait_event_info)
 

Variables

static uint32 local_my_wait_event_info
 
uint32my_wait_event_info = &local_my_wait_event_info
 
static HTABWaitEventCustomHashByInfo
 
static HTABWaitEventCustomHashByName
 
static WaitEventCustomCounterDataWaitEventCustomCounter
 

Macro Definition Documentation

◆ WAIT_EVENT_CLASS_MASK

#define WAIT_EVENT_CLASS_MASK   0xFF000000

Definition at line 42 of file wait_event.c.

◆ WAIT_EVENT_CUSTOM_HASH_INIT_SIZE

#define WAIT_EVENT_CUSTOM_HASH_INIT_SIZE   16

Definition at line 66 of file wait_event.c.

◆ WAIT_EVENT_CUSTOM_HASH_MAX_SIZE

#define WAIT_EVENT_CUSTOM_HASH_MAX_SIZE   128

Definition at line 67 of file wait_event.c.

◆ WAIT_EVENT_CUSTOM_INITIAL_ID

#define WAIT_EVENT_CUSTOM_INITIAL_ID   1

Definition at line 94 of file wait_event.c.

◆ WAIT_EVENT_ID_MASK

#define WAIT_EVENT_ID_MASK   0x0000FFFF

Definition at line 43 of file wait_event.c.

Typedef Documentation

◆ WaitEventCustomCounterData

◆ WaitEventCustomEntryByInfo

◆ WaitEventCustomEntryByName

Function Documentation

◆ GetWaitEventCustomIdentifier()

static const char * GetWaitEventCustomIdentifier ( uint32  wait_event_info)
static

Definition at line 276 of file wait_event.c.

277{
278 bool found;
280
281 /* Built-in event? */
282 if (wait_event_info == PG_WAIT_EXTENSION)
283 return "Extension";
284
285 /* It is a user-defined wait event, so lookup hash table. */
286 LWLockAcquire(WaitEventCustomLock, LW_SHARED);
288 hash_search(WaitEventCustomHashByInfo, &wait_event_info,
289 HASH_FIND, &found);
290 LWLockRelease(WaitEventCustomLock);
291
292 if (!entry)
293 elog(ERROR,
294 "could not find custom name for wait event information %u",
295 wait_event_info);
296
297 return entry->wait_event_name;
298}
void * hash_search(HTAB *hashp, const void *keyPtr, HASHACTION action, bool *foundPtr)
Definition: dynahash.c:955
#define ERROR
Definition: elog.h:39
#define elog(elevel,...)
Definition: elog.h:226
@ HASH_FIND
Definition: hsearch.h:113
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
Definition: lwlock.c:1182
void LWLockRelease(LWLock *lock)
Definition: lwlock.c:1902
@ LW_SHARED
Definition: lwlock.h:115
char wait_event_name[NAMEDATALEN]
Definition: wait_event.c:73
static HTAB * WaitEventCustomHashByInfo
Definition: wait_event.c:63
#define PG_WAIT_EXTENSION
Definition: wait_event.h:23

References elog, ERROR, HASH_FIND, hash_search(), LW_SHARED, LWLockAcquire(), LWLockRelease(), PG_WAIT_EXTENSION, WaitEventCustomEntryByInfo::wait_event_name, and WaitEventCustomHashByInfo.

Referenced by pgstat_get_wait_event().

◆ GetWaitEventCustomNames()

char ** GetWaitEventCustomNames ( uint32  classId,
int *  nwaitevents 
)

Definition at line 306 of file wait_event.c.

307{
308 char **waiteventnames;
310 HASH_SEQ_STATUS hash_seq;
311 int index;
312 int els;
313
314 LWLockAcquire(WaitEventCustomLock, LW_SHARED);
315
316 /* Now we can safely count the number of entries */
318
319 /* Allocate enough space for all entries */
320 waiteventnames = palloc(els * sizeof(char *));
321
322 /* Now scan the hash table to copy the data */
324
325 index = 0;
326 while ((hentry = (WaitEventCustomEntryByName *) hash_seq_search(&hash_seq)) != NULL)
327 {
328 if ((hentry->wait_event_info & WAIT_EVENT_CLASS_MASK) != classId)
329 continue;
330 waiteventnames[index] = pstrdup(hentry->wait_event_name);
331 index++;
332 }
333
334 LWLockRelease(WaitEventCustomLock);
335
336 *nwaitevents = index;
337 return waiteventnames;
338}
void * hash_seq_search(HASH_SEQ_STATUS *status)
Definition: dynahash.c:1420
long hash_get_num_entries(HTAB *hashp)
Definition: dynahash.c:1341
void hash_seq_init(HASH_SEQ_STATUS *status, HTAB *hashp)
Definition: dynahash.c:1385
char * pstrdup(const char *in)
Definition: mcxt.c:2321
void * palloc(Size size)
Definition: mcxt.c:1939
char wait_event_name[NAMEDATALEN]
Definition: wait_event.c:78
Definition: type.h:96
static HTAB * WaitEventCustomHashByName
Definition: wait_event.c:64
#define WAIT_EVENT_CLASS_MASK
Definition: wait_event.c:42

References hash_get_num_entries(), hash_seq_init(), hash_seq_search(), LW_SHARED, LWLockAcquire(), LWLockRelease(), palloc(), pstrdup(), WAIT_EVENT_CLASS_MASK, WaitEventCustomEntryByName::wait_event_info, WaitEventCustomEntryByName::wait_event_name, and WaitEventCustomHashByName.

Referenced by pg_get_wait_events().

◆ pgstat_get_wait_activity()

static const char * pgstat_get_wait_activity ( WaitEventActivity  w)
static

Referenced by pgstat_get_wait_event().

◆ pgstat_get_wait_bufferpin()

static const char * pgstat_get_wait_bufferpin ( WaitEventBufferPin  w)
static

Referenced by pgstat_get_wait_event().

◆ pgstat_get_wait_client()

static const char * pgstat_get_wait_client ( WaitEventClient  w)
static

Referenced by pgstat_get_wait_event().

◆ pgstat_get_wait_event()

const char * pgstat_get_wait_event ( uint32  wait_event_info)

Definition at line 431 of file wait_event.c.

432{
433 uint32 classId;
434 uint16 eventId;
435 const char *event_name;
436
437 /* report process as not waiting. */
438 if (wait_event_info == 0)
439 return NULL;
440
441 classId = wait_event_info & WAIT_EVENT_CLASS_MASK;
442 eventId = wait_event_info & WAIT_EVENT_ID_MASK;
443
444 switch (classId)
445 {
446 case PG_WAIT_LWLOCK:
447 event_name = GetLWLockIdentifier(classId, eventId);
448 break;
449 case PG_WAIT_LOCK:
450 event_name = GetLockNameFromTagType(eventId);
451 break;
454 event_name = GetWaitEventCustomIdentifier(wait_event_info);
455 break;
457 {
458 WaitEventBufferPin w = (WaitEventBufferPin) wait_event_info;
459
460 event_name = pgstat_get_wait_bufferpin(w);
461 break;
462 }
463 case PG_WAIT_ACTIVITY:
464 {
465 WaitEventActivity w = (WaitEventActivity) wait_event_info;
466
467 event_name = pgstat_get_wait_activity(w);
468 break;
469 }
470 case PG_WAIT_CLIENT:
471 {
472 WaitEventClient w = (WaitEventClient) wait_event_info;
473
474 event_name = pgstat_get_wait_client(w);
475 break;
476 }
477 case PG_WAIT_IPC:
478 {
479 WaitEventIPC w = (WaitEventIPC) wait_event_info;
480
481 event_name = pgstat_get_wait_ipc(w);
482 break;
483 }
484 case PG_WAIT_TIMEOUT:
485 {
486 WaitEventTimeout w = (WaitEventTimeout) wait_event_info;
487
488 event_name = pgstat_get_wait_timeout(w);
489 break;
490 }
491 case PG_WAIT_IO:
492 {
493 WaitEventIO w = (WaitEventIO) wait_event_info;
494
495 event_name = pgstat_get_wait_io(w);
496 break;
497 }
498 default:
499 event_name = "unknown wait event";
500 break;
501 }
502
503 return event_name;
504}
uint16_t uint16
Definition: c.h:501
uint32_t uint32
Definition: c.h:502
const char * GetLockNameFromTagType(uint16 locktag_type)
Definition: lmgr.c:1340
const char * GetLWLockIdentifier(uint32 classId, uint16 eventId)
Definition: lwlock.c:781
static const char * pgstat_get_wait_timeout(WaitEventTimeout w)
static const char * pgstat_get_wait_activity(WaitEventActivity w)
static const char * pgstat_get_wait_io(WaitEventIO w)
static const char * GetWaitEventCustomIdentifier(uint32 wait_event_info)
Definition: wait_event.c:276
static const char * pgstat_get_wait_bufferpin(WaitEventBufferPin w)
static const char * pgstat_get_wait_client(WaitEventClient w)
static const char * pgstat_get_wait_ipc(WaitEventIPC w)
#define WAIT_EVENT_ID_MASK
Definition: wait_event.c:43
#define PG_WAIT_TIMEOUT
Definition: wait_event.h:25
#define PG_WAIT_INJECTIONPOINT
Definition: wait_event.h:27
#define PG_WAIT_LWLOCK
Definition: wait_event.h:18
#define PG_WAIT_BUFFERPIN
Definition: wait_event.h:20
#define PG_WAIT_IPC
Definition: wait_event.h:24
#define PG_WAIT_CLIENT
Definition: wait_event.h:22
#define PG_WAIT_ACTIVITY
Definition: wait_event.h:21
#define PG_WAIT_LOCK
Definition: wait_event.h:19
#define PG_WAIT_IO
Definition: wait_event.h:26

References GetLockNameFromTagType(), GetLWLockIdentifier(), GetWaitEventCustomIdentifier(), PG_WAIT_ACTIVITY, PG_WAIT_BUFFERPIN, PG_WAIT_CLIENT, PG_WAIT_EXTENSION, PG_WAIT_INJECTIONPOINT, PG_WAIT_IO, PG_WAIT_IPC, PG_WAIT_LOCK, PG_WAIT_LWLOCK, PG_WAIT_TIMEOUT, pgstat_get_wait_activity(), pgstat_get_wait_bufferpin(), pgstat_get_wait_client(), pgstat_get_wait_io(), pgstat_get_wait_ipc(), pgstat_get_wait_timeout(), WAIT_EVENT_CLASS_MASK, and WAIT_EVENT_ID_MASK.

Referenced by pg_stat_get_activity(), and pg_stat_get_backend_wait_event().

◆ pgstat_get_wait_event_type()

const char * pgstat_get_wait_event_type ( uint32  wait_event_info)

Definition at line 373 of file wait_event.c.

374{
375 uint32 classId;
376 const char *event_type;
377
378 /* report process as not waiting. */
379 if (wait_event_info == 0)
380 return NULL;
381
382 classId = wait_event_info & WAIT_EVENT_CLASS_MASK;
383
384 switch (classId)
385 {
386 case PG_WAIT_LWLOCK:
387 event_type = "LWLock";
388 break;
389 case PG_WAIT_LOCK:
390 event_type = "Lock";
391 break;
393 event_type = "BufferPin";
394 break;
395 case PG_WAIT_ACTIVITY:
396 event_type = "Activity";
397 break;
398 case PG_WAIT_CLIENT:
399 event_type = "Client";
400 break;
402 event_type = "Extension";
403 break;
404 case PG_WAIT_IPC:
405 event_type = "IPC";
406 break;
407 case PG_WAIT_TIMEOUT:
408 event_type = "Timeout";
409 break;
410 case PG_WAIT_IO:
411 event_type = "IO";
412 break;
414 event_type = "InjectionPoint";
415 break;
416 default:
417 event_type = "???";
418 break;
419 }
420
421 return event_type;
422}

References PG_WAIT_ACTIVITY, PG_WAIT_BUFFERPIN, PG_WAIT_CLIENT, PG_WAIT_EXTENSION, PG_WAIT_INJECTIONPOINT, PG_WAIT_IO, PG_WAIT_IPC, PG_WAIT_LOCK, PG_WAIT_LWLOCK, PG_WAIT_TIMEOUT, and WAIT_EVENT_CLASS_MASK.

Referenced by pg_isolation_test_session_is_blocked(), pg_stat_get_activity(), pg_stat_get_backend_wait_event_type(), and WaitEventCustomNew().

◆ pgstat_get_wait_io()

static const char * pgstat_get_wait_io ( WaitEventIO  w)
static

Referenced by pgstat_get_wait_event().

◆ pgstat_get_wait_ipc()

static const char * pgstat_get_wait_ipc ( WaitEventIPC  w)
static

Referenced by pgstat_get_wait_event().

◆ pgstat_get_wait_timeout()

static const char * pgstat_get_wait_timeout ( WaitEventTimeout  w)
static

Referenced by pgstat_get_wait_event().

◆ pgstat_reset_wait_event_storage()

void pgstat_reset_wait_event_storage ( void  )

Definition at line 361 of file wait_event.c.

362{
364}
static uint32 local_my_wait_event_info
Definition: wait_event.c:39
uint32 * my_wait_event_info
Definition: wait_event.c:40

References local_my_wait_event_info, and my_wait_event_info.

Referenced by AuxiliaryProcKill(), and ProcKill().

◆ pgstat_set_wait_event_storage()

void pgstat_set_wait_event_storage ( uint32 wait_event_info)

Definition at line 349 of file wait_event.c.

350{
351 my_wait_event_info = wait_event_info;
352}

References my_wait_event_info.

Referenced by InitAuxiliaryProcess(), and InitProcess().

◆ WaitEventCustomNew()

static uint32 WaitEventCustomNew ( uint32  classId,
const char *  wait_event_name 
)
static

Definition at line 175 of file wait_event.c.

176{
177 uint16 eventId;
178 bool found;
179 WaitEventCustomEntryByName *entry_by_name;
180 WaitEventCustomEntryByInfo *entry_by_info;
181 uint32 wait_event_info;
182
183 /* Check the limit of the length of the event name */
184 if (strlen(wait_event_name) >= NAMEDATALEN)
185 elog(ERROR,
186 "cannot use custom wait event string longer than %u characters",
187 NAMEDATALEN - 1);
188
189 /*
190 * Check if the wait event info associated to the name is already defined,
191 * and return it if so.
192 */
193 LWLockAcquire(WaitEventCustomLock, LW_SHARED);
194 entry_by_name = (WaitEventCustomEntryByName *)
195 hash_search(WaitEventCustomHashByName, wait_event_name,
196 HASH_FIND, &found);
197 LWLockRelease(WaitEventCustomLock);
198 if (found)
199 {
200 uint32 oldClassId;
201
202 oldClassId = entry_by_name->wait_event_info & WAIT_EVENT_CLASS_MASK;
203 if (oldClassId != classId)
206 errmsg("wait event \"%s\" already exists in type \"%s\"",
207 wait_event_name,
209 return entry_by_name->wait_event_info;
210 }
211
212 /*
213 * Allocate and register a new wait event. Recheck if the event name
214 * exists, as it could be possible that a concurrent process has inserted
215 * one with the same name since the LWLock acquired again here was
216 * previously released.
217 */
218 LWLockAcquire(WaitEventCustomLock, LW_EXCLUSIVE);
219 entry_by_name = (WaitEventCustomEntryByName *)
220 hash_search(WaitEventCustomHashByName, wait_event_name,
221 HASH_FIND, &found);
222 if (found)
223 {
224 uint32 oldClassId;
225
226 LWLockRelease(WaitEventCustomLock);
227 oldClassId = entry_by_name->wait_event_info & WAIT_EVENT_CLASS_MASK;
228 if (oldClassId != classId)
231 errmsg("wait event \"%s\" already exists in type \"%s\"",
232 wait_event_name,
234 return entry_by_name->wait_event_info;
235 }
236
237 /* Allocate a new event Id */
239
241 {
244 errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
245 errmsg("too many custom wait events"));
246 }
247
248 eventId = WaitEventCustomCounter->nextId++;
249
251
252 /* Register the new wait event */
253 wait_event_info = classId | eventId;
254 entry_by_info = (WaitEventCustomEntryByInfo *)
255 hash_search(WaitEventCustomHashByInfo, &wait_event_info,
256 HASH_ENTER, &found);
257 Assert(!found);
258 strlcpy(entry_by_info->wait_event_name, wait_event_name,
259 sizeof(entry_by_info->wait_event_name));
260
261 entry_by_name = (WaitEventCustomEntryByName *)
262 hash_search(WaitEventCustomHashByName, wait_event_name,
263 HASH_ENTER, &found);
264 Assert(!found);
265 entry_by_name->wait_event_info = wait_event_info;
266
267 LWLockRelease(WaitEventCustomLock);
268
269 return wait_event_info;
270}
int errcode(int sqlerrcode)
Definition: elog.c:854
int errmsg(const char *fmt,...)
Definition: elog.c:1071
#define ereport(elevel,...)
Definition: elog.h:149
Assert(PointerIsAligned(start, uint64))
@ HASH_ENTER
Definition: hsearch.h:114
@ LW_EXCLUSIVE
Definition: lwlock.h:114
#define NAMEDATALEN
size_t strlcpy(char *dst, const char *src, size_t siz)
Definition: strlcpy.c:45
#define SpinLockRelease(lock)
Definition: spin.h:61
#define SpinLockAcquire(lock)
Definition: spin.h:59
#define ERRCODE_DUPLICATE_OBJECT
Definition: streamutil.c:30
#define WAIT_EVENT_CUSTOM_HASH_MAX_SIZE
Definition: wait_event.c:67
static WaitEventCustomCounterData * WaitEventCustomCounter
Definition: wait_event.c:91
const char * pgstat_get_wait_event_type(uint32 wait_event_info)
Definition: wait_event.c:373

References Assert(), elog, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, HASH_ENTER, HASH_FIND, hash_search(), LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockRelease(), WaitEventCustomCounterData::mutex, NAMEDATALEN, WaitEventCustomCounterData::nextId, pgstat_get_wait_event_type(), SpinLockAcquire, SpinLockRelease, strlcpy(), WAIT_EVENT_CLASS_MASK, WAIT_EVENT_CUSTOM_HASH_MAX_SIZE, WaitEventCustomEntryByName::wait_event_info, WaitEventCustomEntryByInfo::wait_event_name, WaitEventCustomCounter, WaitEventCustomHashByInfo, and WaitEventCustomHashByName.

Referenced by WaitEventExtensionNew(), and WaitEventInjectionPointNew().

◆ WaitEventCustomShmemInit()

void WaitEventCustomShmemInit ( void  )

Definition at line 119 of file wait_event.c.

120{
121 bool found;
122 HASHCTL info;
123
125 ShmemInitStruct("WaitEventCustomCounterData",
126 sizeof(WaitEventCustomCounterData), &found);
127
128 if (!found)
129 {
130 /* initialize the allocation counter and its spinlock. */
133 }
134
135 /* initialize or attach the hash tables to store custom wait events */
136 info.keysize = sizeof(uint32);
139 ShmemInitHash("WaitEventCustom hash by wait event information",
142 &info,
144
145 /* key is a NULL-terminated string */
146 info.keysize = sizeof(char[NAMEDATALEN]);
149 ShmemInitHash("WaitEventCustom hash by name",
152 &info,
154}
#define HASH_STRINGS
Definition: hsearch.h:96
#define HASH_ELEM
Definition: hsearch.h:95
#define HASH_BLOBS
Definition: hsearch.h:97
HTAB * ShmemInitHash(const char *name, long init_size, long max_size, HASHCTL *infoP, int hash_flags)
Definition: shmem.c:332
void * ShmemInitStruct(const char *name, Size size, bool *foundPtr)
Definition: shmem.c:387
#define SpinLockInit(lock)
Definition: spin.h:57
Size keysize
Definition: hsearch.h:75
Size entrysize
Definition: hsearch.h:76
struct WaitEventCustomEntryByName WaitEventCustomEntryByName
#define WAIT_EVENT_CUSTOM_HASH_INIT_SIZE
Definition: wait_event.c:66
struct WaitEventCustomEntryByInfo WaitEventCustomEntryByInfo
#define WAIT_EVENT_CUSTOM_INITIAL_ID
Definition: wait_event.c:94

References HASHCTL::entrysize, HASH_BLOBS, HASH_ELEM, HASH_STRINGS, HASHCTL::keysize, WaitEventCustomCounterData::mutex, NAMEDATALEN, WaitEventCustomCounterData::nextId, ShmemInitHash(), ShmemInitStruct(), SpinLockInit, WAIT_EVENT_CUSTOM_HASH_INIT_SIZE, WAIT_EVENT_CUSTOM_HASH_MAX_SIZE, WAIT_EVENT_CUSTOM_INITIAL_ID, WaitEventCustomCounter, WaitEventCustomHashByInfo, and WaitEventCustomHashByName.

Referenced by CreateOrAttachShmemStructs().

◆ WaitEventCustomShmemSize()

Size WaitEventCustomShmemSize ( void  )

Definition at line 103 of file wait_event.c.

104{
105 Size sz;
106
112 return sz;
113}
#define MAXALIGN(LEN)
Definition: c.h:782
size_t Size
Definition: c.h:576
Size hash_estimate_size(long num_entries, Size entrysize)
Definition: dynahash.c:783
Size add_size(Size s1, Size s2)
Definition: shmem.c:493

References add_size(), hash_estimate_size(), MAXALIGN, and WAIT_EVENT_CUSTOM_HASH_MAX_SIZE.

Referenced by CalculateShmemSize().

◆ WaitEventExtensionNew()

uint32 WaitEventExtensionNew ( const char *  wait_event_name)

Definition at line 163 of file wait_event.c.

164{
165 return WaitEventCustomNew(PG_WAIT_EXTENSION, wait_event_name);
166}
static uint32 WaitEventCustomNew(uint32 classId, const char *wait_event_name)
Definition: wait_event.c:175

References PG_WAIT_EXTENSION, and WaitEventCustomNew().

Referenced by connect_pg_server(), dblink_connect(), dblink_get_conn(), dblink_init(), GetConnection(), pgfdw_get_cleanup_result(), test_shm_mq_pipelined(), wait_for_workers_to_become_ready(), and worker_spi_main().

◆ WaitEventInjectionPointNew()

uint32 WaitEventInjectionPointNew ( const char *  wait_event_name)

Definition at line 169 of file wait_event.c.

170{
171 return WaitEventCustomNew(PG_WAIT_INJECTIONPOINT, wait_event_name);
172}

References PG_WAIT_INJECTIONPOINT, and WaitEventCustomNew().

Referenced by injection_wait().

Variable Documentation

◆ local_my_wait_event_info

uint32 local_my_wait_event_info
static

Definition at line 39 of file wait_event.c.

Referenced by pgstat_reset_wait_event_storage().

◆ my_wait_event_info

◆ WaitEventCustomCounter

WaitEventCustomCounterData* WaitEventCustomCounter
static

Definition at line 91 of file wait_event.c.

Referenced by WaitEventCustomNew(), and WaitEventCustomShmemInit().

◆ WaitEventCustomHashByInfo

HTAB* WaitEventCustomHashByInfo
static

◆ WaitEventCustomHashByName

HTAB* WaitEventCustomHashByName
static