mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Use more consistent names for wait event objects and types
The event names use the same case-insensitive characters, hence applying lower() or upper() to the monitoring queries allows the detection of the same events as before this change. It is possible to cross-check the data with the system view pg_wait_events, for instance, with a query like that showing no differences: SELECT lower(type), lower(name), description FROM pg_wait_events ORDER BY 1, 2; This will help in the introduction of more simplifications in the format of wait_event_names. Some of the enum values in the code had to be renamed a bit to follow the same convention naming across the board. Reviewed-by: Bertrand Drouvot Discussion: https://postgr.es/m/ZOxVHQwEC/9X/p/z@paquier.xyz
This commit is contained in:
@@ -1017,7 +1017,7 @@ shm_mq_send_bytes(shm_mq_handle *mqh, Size nbytes, const void *data,
|
||||
* cheaper than setting one that has been reset.
|
||||
*/
|
||||
(void) WaitLatch(MyLatch, WL_LATCH_SET | WL_EXIT_ON_PM_DEATH, 0,
|
||||
WAIT_EVENT_MQ_SEND);
|
||||
WAIT_EVENT_MESSAGE_QUEUE_SEND);
|
||||
|
||||
/* Reset the latch so we don't spin. */
|
||||
ResetLatch(MyLatch);
|
||||
@@ -1163,7 +1163,7 @@ shm_mq_receive_bytes(shm_mq_handle *mqh, Size bytes_needed, bool nowait,
|
||||
* setting one that has been reset.
|
||||
*/
|
||||
(void) WaitLatch(MyLatch, WL_LATCH_SET | WL_EXIT_ON_PM_DEATH, 0,
|
||||
WAIT_EVENT_MQ_RECEIVE);
|
||||
WAIT_EVENT_MESSAGE_QUEUE_RECEIVE);
|
||||
|
||||
/* Reset the latch so we don't spin. */
|
||||
ResetLatch(MyLatch);
|
||||
@@ -1252,7 +1252,7 @@ shm_mq_wait_internal(shm_mq *mq, PGPROC **ptr, BackgroundWorkerHandle *handle)
|
||||
|
||||
/* Wait to be signaled. */
|
||||
(void) WaitLatch(MyLatch, WL_LATCH_SET | WL_EXIT_ON_PM_DEATH, 0,
|
||||
WAIT_EVENT_MQ_INTERNAL);
|
||||
WAIT_EVENT_MESSAGE_QUEUE_INTERNAL);
|
||||
|
||||
/* Reset the latch so we don't spin. */
|
||||
ResetLatch(MyLatch);
|
||||
|
||||
Reference in New Issue
Block a user