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.
pull/248/head
Alexander Korotkov 2 months ago
parent 07961ef866
commit 7742f99a02
  1. 2
      src/backend/access/transam/xlogwait.c

@ -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

Loading…
Cancel
Save