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 /contrib/pg_prewarm | |
| 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/c6f35117-4b20-4c78-1df5-d3056010dcf5@gmail.com
Discussion: https://postgr.es/m/77a86b3a-c4a8-5f5d-69b9-d70bbf2e9b98@gmail.com
Diffstat (limited to 'contrib/pg_prewarm')
| -rw-r--r-- | contrib/pg_prewarm/autoprewarm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pg_prewarm/autoprewarm.c b/contrib/pg_prewarm/autoprewarm.c index 93835449c0e..d0efc9e5249 100644 --- a/contrib/pg_prewarm/autoprewarm.c +++ b/contrib/pg_prewarm/autoprewarm.c @@ -237,7 +237,7 @@ autoprewarm_main(Datum main_arg) (void) WaitLatch(MyLatch, WL_LATCH_SET | WL_EXIT_ON_PM_DEATH, -1L, - PG_WAIT_EXTENSION); + WAIT_EVENT_EXTENSION); } else { @@ -264,7 +264,7 @@ autoprewarm_main(Datum main_arg) (void) WaitLatch(MyLatch, WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH, delay_in_ms, - PG_WAIT_EXTENSION); + WAIT_EVENT_EXTENSION); } /* Reset the latch, loop. */ |
