From: Benoit Lobréau <benoit.lobreau@dalibo.com>
To: Michael Paquier <michael@paquier.xyz>
To: David Steele <david@pgbackrest.org>
Cc: Andrey M. Borodin <x4mmm@yandex-team.ru>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Fix logging for invalid recovery timeline
Date: Mon, 24 Feb 2025 17:21:41 +0100
Message-ID: <f0e04cf5-e7e3-4c16-9c7a-dc7a2aa2c069@dalibo.com> (raw)
In-Reply-To: <Z7vF1hyg5JOFTWst@paquier.xyz>
References: <c3d617d4-1696-4aa7-8a4d-5a7d19cc5618@pgbackrest.org>
<C748635E-B2FF-4813-B035-AE670832B9FD@yandex-team.ru>
<d0b27c08-d30f-4a1d-990d-5c90ca0a650a@pgbackrest.org>
<4ed10bc8-5513-4d8e-8643-8abcaa08336d@dalibo.com>
<2765f538-b06f-4e57-bcb2-9ca1dc6f487d@pgbackrest.org>
<Z7aJU2_ZAplbpTsL@paquier.xyz>
<6273ef0b-033b-4ac7-ab05-71a04e7ac626@pgbackrest.org>
<173a9a4a-bad3-4a42-91e1-637f70e9512f@dalibo.com>
<5336e68a-30d0-473f-a0a0-9e61cd9a5a63@pgbackrest.org>
<Z7vF1hyg5JOFTWst@paquier.xyz>
On 2/24/25 2:05 AM, Michael Paquier wrote:
> I think that you have the right idea here, avoiding the duplication
> of the errdetail() which feels itchy when looking at the patch.
Done this way in the attached patch.
> This should have a note for translators that this field refers to a file
> name.
Is there a specific way todo this?
--
Benoit Lobréau
Consultant
http://dalibo.comAttachments:V2_0001-Adjust-logging-for-invalid-recovery-timeline.patch (text/x-patch, 1.5K) download
From 35dd8db22c997e78ba92f63ffca3022b435d7304 Mon Sep 17 00:00:00 2001
From: benoit <benoit.lobreau@dalibo.com>
Date: Fri, 21 Feb 2025 14:09:56 +0100
Subject: [PATCH] Adjust logging for invalid recovery timeline
The original message doesn't mention where the checkpoint was read from.
It refers to the "Latest checkpoint", the terminology is used for some
records from the control file (specifically, the pg_controldata output).
The backup label uses "Checkpoint location".
---
src/backend/access/transam/xlogrecovery.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.cindex 915cb330295..c5160bf5258 100644--- a/src/backend/access/transam/xlogrecovery.c+++ b/src/backend/access/transam/xlogrecovery.c@@ -849,7 +849,8 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr,
ereport(FATAL,
(errmsg("requested timeline %u is not a child of this server's history",
recoveryTargetTLI),
- 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.",+ errdetail("Latest checkpoint in %s 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.",+ haveBackupLabel ? "backup_label" : "pg_control",
LSN_FORMAT_ARGS(CheckPointLoc),
CheckPointTLI,
LSN_FORMAT_ARGS(switchpoint))));
--
2.48.1
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: benoit.lobreau@dalibo.com, michael@paquier.xyz, david@pgbackrest.org, x4mmm@yandex-team.ru
Subject: Re: Fix logging for invalid recovery timeline
In-Reply-To: <f0e04cf5-e7e3-4c16-9c7a-dc7a2aa2c069@dalibo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox