1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-13 16:22:44 +03:00

Fix checking for recovery state in WaitForLSN()

We only need to do it for WAIT_LSN_TYPE_REPLAY.  WAIT_LSN_TYPE_FLUSH can work
for both primary and follower.
This commit is contained in:
Alexander Korotkov
2025-11-07 23:34:50 +02:00
parent 07961ef866
commit 7742f99a02

View File

@@ -347,7 +347,7 @@ WaitForLSN(WaitLSNType lsnType, XLogRecPtr targetLSN, int64 timeout)
currentLSN = GetFlushRecPtr(NULL);
/* Check that recovery is still in-progress */
if (!RecoveryInProgress())
if (lsnType == WAIT_LSN_TYPE_REPLAY && !RecoveryInProgress())
{
/*
* Recovery was ended, but check if target LSN was already