pgsql: Fix FATAL message for invalid recovery timeline at beginning of

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix FATAL message for invalid recovery timeline at beginning of
Date: 2025-02-20 01:44:03
Message-ID: E1tkvbg-000E9c-2M@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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 (4a92a1c3d1c3, a27048cbcb58), making
this change a bit simpler to think about, so backpatch only down to this
version.

Author: David Steele <david(at)pgbackrest(dot)org>
Reviewed-by: Andrey M. Borodin <x4mmm(at)yandex-team(dot)ru>
Reviewed-by: Benoit Lobréau <benoit(dot)lobreau(at)dalibo(dot)com>
Discussion: https://postgr.es/m/c3d617d4-1696-4aa7-8a4d-5a7d19cc5618@pgbackrest.org
Backpatch-through: 15

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b4969a29657dfeb05b61baaa7d7be72b957ac262

Modified Files
--------------
src/backend/access/transam/xlogrecovery.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Langote 2025-02-20 03:37:03 Re: pgsql: doc: Fix some issues with JSON_TABLE() exampls
Previous Message Andres Freund 2025-02-20 00:37:50 pgsql: pgbench: Increase RLIMIT_NOFILE if necessary