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:
@@ -347,7 +347,7 @@ WaitForLSN(WaitLSNType lsnType, XLogRecPtr targetLSN, int64 timeout)
|
|||||||
currentLSN = GetFlushRecPtr(NULL);
|
currentLSN = GetFlushRecPtr(NULL);
|
||||||
|
|
||||||
/* Check that recovery is still in-progress */
|
/* 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
|
* Recovery was ended, but check if target LSN was already
|
||||||
|
|||||||
Reference in New Issue
Block a user