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

Commit542bdb2

Browse files
committed
Fix bug introduced by the recent patch to check that the checkpoint redo
location read from backup label file can be found: wasShutdown was setincorrectly when a backup label file was found.Jeff Davis, with a little tweaking by me.
1 parentb0f2d68 commit542bdb2

File tree

1 file changed

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

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5864,6 +5864,7 @@ StartupXLOG(void)
58645864
if (record!=NULL)
58655865
{
58665866
memcpy(&checkPoint,XLogRecGetData(record),sizeof(CheckPoint));
5867+
wasShutdown= (record->xl_info==XLOG_CHECKPOINT_SHUTDOWN);
58675868
ereport(DEBUG1,
58685869
(errmsg("checkpoint record is at %X/%X",
58695870
checkPointLoc.xlogid,checkPointLoc.xrecoff)));
@@ -5888,6 +5889,7 @@ StartupXLOG(void)
58885889
ereport(FATAL,
58895890
(errmsg("could not locate required checkpoint record"),
58905891
errhint("If you are not restoring from a backup, try removing the file \"%s/backup_label\".",DataDir)));
5892+
wasShutdown= false;/* keep compiler quiet */
58915893
}
58925894
/* set flag to delete it later */
58935895
haveBackupLabel= true;
@@ -5932,10 +5934,10 @@ StartupXLOG(void)
59325934
(errmsg("could not locate a valid checkpoint record")));
59335935
}
59345936
memcpy(&checkPoint,XLogRecGetData(record),sizeof(CheckPoint));
5937+
wasShutdown= (record->xl_info==XLOG_CHECKPOINT_SHUTDOWN);
59355938
}
59365939

59375940
LastRec=RecPtr=checkPointLoc;
5938-
wasShutdown= (record->xl_info==XLOG_CHECKPOINT_SHUTDOWN);
59395941

59405942
ereport(DEBUG1,
59415943
(errmsg("redo record is at %X/%X; shutdown %s",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp