From 2ab833379e5f64ddfa7000f636081477362dad23 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Fri, 28 Jun 2024 09:39:52 +1000 Subject: [PATCH v1] Fix walsender comment --- src/backend/replication/walsender.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index c623b07..e0b0dd7 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -1083,7 +1083,10 @@ logical_read_xlog_page(XLogReaderState *state, XLogRecPtr targetPagePtr, int req sendTimeLineValidUpto = state->currTLIValidUntil; sendTimeLineNextTLI = state->nextTLI; - /* fail if not (implies we are going to shut down) */ + /* + * Fail if there is not enough WAL available. This can happen during + * shutdown. + */ if (flushptr < targetPagePtr + reqLen) return -1; -- 1.8.3.1