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

Commitd53d705

Browse files
michaelpqpull[bot]
authored andcommitted
Add some checkpoint and redo LSNs to a couple of recovery errors
Two FATALs and one PANIC gain details about the LSNs they fail at:- When restoring from a backup_label, the FATAL log generated when notfinding the checkpoint record now reports its LSN.- When restoring from a backup_label, the FATAL log generated when notfinding the redo record referenced by a checkpoint record now shows boththe redo and checkpoint record LSNs.- When not restoring from a backup_label, the PANIC error generated whennot finding the checkpoint record now reports its LSN.This information is useful when debugging corruption issues, and theseLSNs may not show up in the logs depending on the level of loggingconfigured in the backend.Author: David SteeleDiscussion:https://postgr.es/m/0e90da89-77ca-4ccf-872c-9626d755e288@pgmasters.net
1 parentdb12c4f commitd53d705

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,8 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr,
646646
if (!ReadRecord(xlogprefetcher,LOG, false,
647647
checkPoint.ThisTimeLineID))
648648
ereport(FATAL,
649-
(errmsg("could not find redo location referenced by checkpoint record"),
649+
(errmsg("could not find redo location %X/%X referenced by checkpoint record at %X/%X",
650+
LSN_FORMAT_ARGS(checkPoint.redo),LSN_FORMAT_ARGS(CheckPointLoc)),
650651
errhint("If you are restoring from a backup, touch \"%s/recovery.signal\" or \"%s/standby.signal\" and add required recovery options.\n"
651652
"If you are not restoring from a backup, try removing the file \"%s/backup_label\".\n"
652653
"Be careful: removing \"%s/backup_label\" will result in a corrupt cluster if restoring from a backup.",
@@ -656,7 +657,8 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr,
656657
else
657658
{
658659
ereport(FATAL,
659-
(errmsg("could not locate required checkpoint record"),
660+
(errmsg("could not locate required checkpoint record at %X/%X",
661+
LSN_FORMAT_ARGS(CheckPointLoc)),
660662
errhint("If you are restoring from a backup, touch \"%s/recovery.signal\" or \"%s/standby.signal\" and add required recovery options.\n"
661663
"If you are not restoring from a backup, try removing the file \"%s/backup_label\".\n"
662664
"Be careful: removing \"%s/backup_label\" will result in a corrupt cluster if restoring from a backup.",
@@ -790,7 +792,8 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr,
790792
* simplify processing around checkpoints.
791793
*/
792794
ereport(PANIC,
793-
(errmsg("could not locate a valid checkpoint record")));
795+
(errmsg("could not locate a valid checkpoint record at %X/%X",
796+
LSN_FORMAT_ARGS(CheckPointLoc))));
794797
}
795798
memcpy(&checkPoint,XLogRecGetData(xlogreader),sizeof(CheckPoint));
796799
wasShutdown= ((record->xl_info& ~XLR_INFO_MASK)==XLOG_CHECKPOINT_SHUTDOWN);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp