1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*-------------------------------------------------------------------------
* wait_event.h
* Definitions related to wait event reporting
*
* Copyright (c) 2001-2025, PostgreSQL Global Development Group
*
* src/include/utils/wait_event.h
* ----------
*/
/* enums for wait events */
extern const char *;
extern const char *;
static inline void ;
static inline void ;
extern void ;
extern void ;
extern PGDLLIMPORT uint32 *my_wait_event_info;
/*
* Wait Events - Extension, InjectionPoint
*
* 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 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 uint32 ;
extern uint32 ;
extern void ;
extern Size ;
extern char **;
/* ----------
* pgstat_report_wait_start() -
*
* Called from places where server process needs to wait. This is called
* to report wait event information. The wait information is stored
* as 4-bytes where first byte represents the wait event class (type of
* wait, for different types of wait, refer WaitClass) and the next
* 3-bytes represent the actual wait event. Currently 2-bytes are used
* for wait event which is sufficient for current usage, 1-byte is
* reserved for future usage.
*
* Historically we used to make this reporting conditional on
* pgstat_track_activities, but the check for that seems to add more cost
* than it saves.
*
* my_wait_event_info initially points to local memory, making it safe to
* call this before MyProc has been initialized.
* ----------
*/
static inline void
/* ----------
* pgstat_report_wait_end() -
*
* Called to report end of a wait.
* ----------
*/
static inline void
/* WAIT_EVENT_H */