diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 418054066d1..c255691918d 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -6256,8 +6256,7 @@ StartupXLOG(void) } /* - * set backupStartupPoint if we're starting archive recovery from a - * base backup + * set backupStartPoint if we're starting recovery from a base backup */ if (haveBackupLabel) ControlFile->backupStartPoint = checkPoint.redo; @@ -6610,7 +6609,7 @@ StartupXLOG(void) * be further ahead --- ControlFile->minRecoveryPoint cannot have been * advanced beyond the WAL we processed. */ - if (InArchiveRecovery && + if (InRecovery && (XLByteLT(EndOfLog, minRecoveryPoint) || !XLogRecPtrIsInvalid(ControlFile->backupStartPoint))) { @@ -8311,8 +8310,7 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record) * record, the backup was cancelled and the end-of-backup record will * never arrive. */ - if (InArchiveRecovery && - !XLogRecPtrIsInvalid(ControlFile->backupStartPoint)) + if (!XLogRecPtrIsInvalid(ControlFile->backupStartPoint)) ereport(ERROR, (errmsg("online backup was cancelled, recovery cannot continue")));