aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2022-09-15 06:45:23 -0700
committerNoah Misch <noah@leadboat.com>2022-09-15 06:45:28 -0700
commite36cbef04bd59f5e2e56a180475d64b0dc06d069 (patch)
tree35c1dc16a84bd7067791a7e6a88acd5da9d0397c /src
parenteed548822ca23d3a35dfda7f559b1b7e443ac056 (diff)
downloadpostgresql-e36cbef04bd59f5e2e56a180475d64b0dc06d069.tar.gz
postgresql-e36cbef04bd59f5e2e56a180475d64b0dc06d069.zip
Reset InstallXLogFileSegmentActive after walreceiver self-initiated exit.
After commit cc2c7d65fc27e877c9f407587b0b92d46cd6dd16 added this flag, failure to reset it caused assertion failures. In non-assert builds, it made the system fail to achieve the objectives listed in that commit; chiefly, we might emit a spurious log message. Back-patch to v15, where that commit first appeared. Bharath Rupireddy and Kyotaro Horiguchi. Reviewed by Dilip Kumar, Nathan Bossart and Michael Paquier. Reported by Dilip Kumar. Discussion: https://postgr.es/m/CAFiTN-sE3ry=ycMPVtC+Djw4Fd7gbUGVv_qqw6qfzp=JLvqT3g@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/xlogrecovery.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index ec79f492ee8..65bc11d5d36 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -3530,8 +3530,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
* walreceiver is not active, so that it won't overwrite
* WAL that we restore from archive.
*/
- if (WalRcvStreaming())
- XLogShutdownWalRcv();
+ XLogShutdownWalRcv();
/*
* Before we sleep, re-scan for possible new timelines if