aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-02-01 10:46:45 +0900
committerMichael Paquier <michael@paquier.xyz>2019-02-01 10:46:45 +0900
commitc93001b3f957994942ea18ed261ae06ac507ea95 (patch)
tree2dfa1d137826232631baf242f23a23d1a165776b /src/backend/access/transam/xlog.c
parenteb8c9f0bc394160efd6951c69e644551e835a486 (diff)
downloadpostgresql-c93001b3f957994942ea18ed261ae06ac507ea95.tar.gz
postgresql-c93001b3f957994942ea18ed261ae06ac507ea95.zip
Adjust comment about timeout when waiting for WAL at recovery
A timeout of 5s is used when waiting for WAL to become available at recovery so as the startup process is able to react promptly if a trigger file shows up. However this missed the fact that the startup process also relies on the timeout to check periodically the status of any active WAL receiver. Discussion: https://postgr.es/m/20190131070956.GE13429@paquier.xyz
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 2ab7d804f03..a9f32728495 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -12104,7 +12104,8 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
/*
* Wait for more WAL to arrive. Time out after 5 seconds
- * to react to a trigger file promptly.
+ * to react to a trigger file promptly and to check if the
+ * WAL receiver is still active.
*/
(void) WaitLatch(&XLogCtl->recoveryWakeupLatch,
WL_LATCH_SET | WL_TIMEOUT |