Skip to content

Commit e36cbef

Browse files
committed
Reset InstallXLogFileSegmentActive after walreceiver self-initiated exit.
After commit cc2c7d6 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
1 parent eed5488 commit e36cbef

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/backend/access/transam/xlogrecovery.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3530,8 +3530,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
35303530
* walreceiver is not active, so that it won't overwrite
35313531
* WAL that we restore from archive.
35323532
*/
3533-
if (WalRcvStreaming())
3534-
XLogShutdownWalRcv();
3533+
XLogShutdownWalRcv();
35353534

35363535
/*
35373536
* Before we sleep, re-scan for possible new timelines if

0 commit comments

Comments
 (0)