Content-Length: 274724 | pFad | http://github.com/postgrespro/postgres/commit/29cce279bbc5919b8a85fb1ebc71d24395b2451b

6F Fix FATAL message for invalid recovery timeline at beginning of recovery · postgrespro/postgres@29cce27 · GitHub
Skip to content

Commit 29cce27

Browse files
committed
Fix FATAL message for invalid recovery timeline at beginning of recovery
If the requested recovery timeline is not reachable, the logged checkpoint and timeline should to be the values read from the backup_label when it is defined. The message generated used the values from the control file in this case, which is fine when recovering from the control file without a backup_label, but not if there is a backup_label. Issue introduced in ee99427. v15 has introduced xlogrecovery.c and more simplifications in this area (4a92a1c, a27048c), making this change a bit simpler to think about, so backpatch only down to this version. 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.org Backpatch-through: 15
1 parent e7f7218 commit 29cce27

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
@@ -844,13 +844,13 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr,
844844
* tliSwitchPoint will throw an error if the checkpoint's timeline is
845845
* not in expectedTLEs at all.
846846
*/
847-
switchpoint = tliSwitchPoint(ControlFile->checkPointCopy.ThisTimeLineID, expectedTLEs, NULL);
847+
switchpoint = tliSwitchPoint(CheckPointTLI, expectedTLEs, NULL);
848848
ereport(FATAL,
849849
(errmsg("requested timeline %u is not a child of this server's history",
850850
recoveryTargetTLI),
851851
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.",
852-
LSN_FORMAT_ARGS(ControlFile->checkPoint),
853-
ControlFile->checkPointCopy.ThisTimeLineID,
852+
LSN_FORMAT_ARGS(CheckPointLoc),
853+
CheckPointTLI,
854854
LSN_FORMAT_ARGS(switchpoint))));
855855
}
856856

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/29cce279bbc5919b8a85fb1ebc71d24395b2451b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy