diff options
author | Michael Paquier | 2023-07-03 02:01:02 +0000 |
---|---|---|
committer | Michael Paquier | 2023-07-03 02:01:02 +0000 |
commit | 2aeaf80e578ed48af88d54caf2ffcf7ca62617e8 (patch) | |
tree | a322df445b8663e7e6dbbaa970ae856d40d36902 /src/include/utils/wait_event.h | |
parent | 8c12838001c2d974d3608fe55c228f601818a729 (diff) |
Refactor some code related to wait events "BufferPin" and "Extension"
The following changes are done:
- Addition of WaitEventBufferPin and WaitEventExtension, that hold a
list of wait events related to each category.
- Addition of two functions that encapsulate the list of wait events for
each category.
- Rename BUFFER_PIN to BUFFERPIN (only this wait event class used an
underscore, requiring a specific rule in the automation script).
These changes make a bit easier the automatic generation of all the code
and documentation related to wait events, as all the wait event
categories are now controlled by consistent structures and functions.
Author: Bertrand Drouvot
Discussion: https://postgr.es/m/[email protected]
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/include/utils/wait_event.h')
-rw-r--r-- | src/include/utils/wait_event.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/include/utils/wait_event.h b/src/include/utils/wait_event.h index 518d3b0a1f7..dc01d4e84df 100644 --- a/src/include/utils/wait_event.h +++ b/src/include/utils/wait_event.h @@ -17,7 +17,7 @@ */ #define PG_WAIT_LWLOCK 0x01000000U #define PG_WAIT_LOCK 0x03000000U -#define PG_WAIT_BUFFER_PIN 0x04000000U +#define PG_WAIT_BUFFERPIN 0x04000000U #define PG_WAIT_ACTIVITY 0x05000000U #define PG_WAIT_CLIENT 0x06000000U #define PG_WAIT_EXTENSION 0x07000000U @@ -51,6 +51,15 @@ typedef enum } WaitEventActivity; /* ---------- + * Wait Events - BUFFERPIN + * ---------- + */ +typedef enum +{ + WAIT_EVENT_BUFFER_PIN = PG_WAIT_BUFFERPIN +} WaitEventBufferPin; + +/* ---------- * Wait Events - Client * * Use this category when a process is waiting to send data to or receive data @@ -71,6 +80,15 @@ typedef enum } WaitEventClient; /* ---------- + * Wait Events - EXTENSION + * ---------- + */ +typedef enum +{ + WAIT_EVENT_EXTENSION = PG_WAIT_EXTENSION +} WaitEventExtension; + +/* ---------- * Wait Events - IPC * * Use this category when a process cannot complete the work it is doing because |