summaryrefslogtreecommitdiff
path: root/src/include/utils/wait_event.h
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2022-03-16 15:35:42 +1300
committerThomas Munro <tmunro@postgresql.org>2022-03-16 15:35:42 +1300
commit1396b5c6ed2bf46433c77ad0ce7f1ddaa984c224 (patch)
tree4bbf5e5e7a03b45490ed53b58c3914b48d34a0d0 /src/include/utils/wait_event.h
parentb61e6214cface3def6241295edadf4eeaf4c884d (diff)
Fix waiting in RegisterSyncRequest().
If we run out of space in the checkpointer sync request queue (which is hopefully rare on real systems, but common with very small buffer pool), we wait for it to drain. While waiting, we should report that as a wait event so that users know what is going on, and also handle postmaster death, since otherwise the loop might never terminate if the checkpointer has exited. Back-patch to 12. Although the problem exists in earlier releases too, the code is structured differently before 12 so I haven't gone any further for now, in the absence of field complaints. Reported-by: Andres Freund <andres@anarazel.de> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/20220226213942.nb7uvb2pamyu26dj%40alap3.anarazel.de
Diffstat (limited to 'src/include/utils/wait_event.h')
-rw-r--r--src/include/utils/wait_event.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/utils/wait_event.h b/src/include/utils/wait_event.h
index 1fb6f640138..4b1cea65938 100644
--- a/src/include/utils/wait_event.h
+++ b/src/include/utils/wait_event.h
@@ -141,7 +141,8 @@ typedef enum
WAIT_EVENT_RECOVERY_APPLY_DELAY,
WAIT_EVENT_RECOVERY_RETRIEVE_RETRY_INTERVAL,
WAIT_EVENT_VACUUM_DELAY,
- WAIT_EVENT_CHECKPOINT_WRITE_DELAY
+ WAIT_EVENT_CHECKPOINT_WRITE_DELAY,
+ WAIT_EVENT_REGISTER_SYNC_REQUEST
} WaitEventTimeout;
/* ----------