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

Commit71f1782

Browse files
committed
Fix FATAL message for invalid recovery timeline at beginning of recovery
If the requested recovery timeline is not reachable, the loggedcheckpoint and timeline should to be the values read from thebackup_label when it is defined. The message generated used the valuesfrom the control file in this case, which is fine when recovering fromthe control file without a backup_label, but not if there is abackup_label.Issue introduced inee99427. v15 has introduced xlogrecovery.c andmore simplifications in this area (4a92a1c,a27048c), makingthis change a bit simpler to think about, so backpatch only down to thisversion.Author: David Steele <david@pgbackrest.org>Reviewed-by: Andrey M. Borodin <x4mmm@yandex-team.ru>Reviewed-by: Benoit Lobréau <benoit.lobreau@dalibo.com>Discussion:https://postgr.es/m/c3d617d4-1696-4aa7-8a4d-5a7d19cc5618@pgbackrest.orgBackpatch-through: 15
1 parentd38bab5 commit71f1782

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -845,13 +845,13 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr,
845845
* tliSwitchPoint will throw an error if the checkpoint's timeline is
846846
* not in expectedTLEs at all.
847847
*/
848-
switchpoint=tliSwitchPoint(ControlFile->checkPointCopy.ThisTimeLineID,expectedTLEs,NULL);
848+
switchpoint=tliSwitchPoint(CheckPointTLI,expectedTLEs,NULL);
849849
ereport(FATAL,
850850
(errmsg("requested timeline %u is not a child of this server's history",
851851
recoveryTargetTLI),
852852
errdetail("Latest checkpoint is at %X/%X on timeline %u, but in the history of the requested timeline, the server forked off from that timeline at %X/%X.",
853-
LSN_FORMAT_ARGS(ControlFile->checkPoint),
854-
ControlFile->checkPointCopy.ThisTimeLineID,
853+
LSN_FORMAT_ARGS(CheckPointLoc),
854+
CheckPointTLI,
855855
LSN_FORMAT_ARGS(switchpoint))));
856856
}
857857

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp