Refactor some code related to wait events "BufferPin" and "Extension"
Michael Paquier <michael@paquier.xyz>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/dblink/dblink.c | modified | +2 −2 |
| contrib/pg_prewarm/autoprewarm.c | modified | +2 −2 |
| contrib/postgres_fdw/connection.c | modified | +3 −3 |
| src/backend/storage/buffer/bufmgr.c | modified | +1 −1 |
| src/backend/storage/ipc/standby.c | modified | +1 −1 |
| src/backend/utils/activity/wait_event.c | modified | +60 −6 |
| src/include/utils/wait_event.h | modified | +19 −1 |
| src/test/modules/test_shm_mq/setup.c | modified | +1 −1 |
| src/test/modules/test_shm_mq/test.c | modified | +1 −1 |
| src/test/modules/worker_spi/worker_spi.c | modified | +1 −1 |
| src/tools/pgindent/typedefs.list | modified | +2 −0 |
Discussion
- Introduce WAIT_EVENT_EXTENSION and WAIT_EVENT_BUFFER_PIN 25 messages · 2023-05-15 → 2023-07-03
- Autogenerate some wait events code and documentation 77 messages · 2023-03-29 → 2024-04-05