Fix FATAL message for invalid recovery timeline at beginning of recovery
authorMichael Paquier <michael@paquier.xyz>
Thu, 20 Feb 2025 01:43:35 +0000 (10:43 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 20 Feb 2025 01:43:35 +0000 (10:43 +0900)
commit29cce279bbc5919b8a85fb1ebc71d24395b2451b
treec5939b8ce7d39b490c4228b23e120d392860cf95
parente7f72185062ca1c76334e1d6de35ec17a2489234
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 ee994272ca50.  v15 has introduced xlogrecovery.c and
more simplifications in this area (4a92a1c3d1c3a27048cbcb58), 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
src/backend/access/transam/xlogrecovery.c