Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteff9335

Browse files
committed
Check that we've reached end-of-backup also when we're not performing
archive recovery.It's possible to restore an online backup without recovery.conf, by simplycopying all the necessary WAL files to pg_xlog. "pg_basebackup -x" does thattoo. That's the use case where this cross-check is useful.Backpatch to 9.0. We used to do this in earlier versins, but in 9.0 the codewas inadvertently changed so that the check is only performed after archiverecovery.Fujii Masao.
1 parentce3b0ab commiteff9335

File tree

1 file changed

+3
-5
lines changed
  • src/backend/access/transam

1 file changed

+3
-5
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5997,8 +5997,7 @@ StartupXLOG(void)
59975997
}
59985998

59995999
/*
6000-
* set backupStartupPoint if we're starting archive recovery from a
6001-
* base backup
6000+
* set backupStartPoint if we're starting recovery from a base backup
60026001
*/
60036002
if (haveBackupLabel)
60046003
ControlFile->backupStartPoint=checkPoint.redo;
@@ -6319,7 +6318,7 @@ StartupXLOG(void)
63196318
* be further ahead --- ControlFile->minRecoveryPoint cannot have been
63206319
* advanced beyond the WAL we processed.
63216320
*/
6322-
if (InArchiveRecovery&&
6321+
if (InRecovery&&
63236322
(XLByteLT(EndOfLog,minRecoveryPoint)||
63246323
!XLogRecPtrIsInvalid(ControlFile->backupStartPoint)))
63256324
{
@@ -7911,8 +7910,7 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record)
79117910
* record, the backup was cancelled and the end-of-backup record will
79127911
* never arrive.
79137912
*/
7914-
if (InArchiveRecovery&&
7915-
!XLogRecPtrIsInvalid(ControlFile->backupStartPoint))
7913+
if (!XLogRecPtrIsInvalid(ControlFile->backupStartPoint))
79167914
ereport(ERROR,
79177915
(errmsg("online backup was cancelled, recovery cannot continue")));
79187916

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp