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

Commitf5cf3ce

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 parent5154eba commitf5cf3ce

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
@@ -4424,6 +4424,7 @@ StartupXLOG(void)
44244424
if (record!=NULL)
44254425
{
44264426
memcpy(&checkPoint,XLogRecGetData(record),sizeof(CheckPoint));
4427+
wasShutdown= (record->xl_info==XLOG_CHECKPOINT_SHUTDOWN);
44274428
ereport(LOG,
44284429
(errmsg("checkpoint record is at %X/%X",
44294430
checkPointLoc.xlogid,checkPointLoc.xrecoff)));
@@ -4448,6 +4449,7 @@ StartupXLOG(void)
44484449
ereport(FATAL,
44494450
(errmsg("could not locate required checkpoint record"),
44504451
errhint("If you are not restoring from a backup, try removing the file \"%s/backup_label\".",DataDir)));
4452+
wasShutdown= false;/* keep compiler quiet */
44514453
}
44524454
}
44534455
else
@@ -4480,10 +4482,10 @@ StartupXLOG(void)
44804482
(errmsg("could not locate a valid checkpoint record")));
44814483
}
44824484
memcpy(&checkPoint,XLogRecGetData(record),sizeof(CheckPoint));
4485+
wasShutdown= (record->xl_info==XLOG_CHECKPOINT_SHUTDOWN);
44834486
}
44844487

44854488
LastRec=RecPtr=checkPointLoc;
4486-
wasShutdown= (record->xl_info==XLOG_CHECKPOINT_SHUTDOWN);
44874489

44884490
ereport(LOG,
44894491
(errmsg("redo record is at %X/%X; undo record is at %X/%X; shutdown %s",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp