Re: Fix logging for invalid recovery timeline

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: David Steele <david(at)pgbackrest(dot)org>
Cc: Benoit Lobréau <benoit(dot)lobreau(at)dalibo(dot)com>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix logging for invalid recovery timeline
Date: 2025-02-20 01:45:55
Message-ID: Z7aJU2_ZAplbpTsL@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 19, 2025 at 05:35:18PM +0000, David Steele wrote:
> I like this idea but I would prefer to get the patch committed as-is first.
> The reason is that I'm hoping to see this batch-patched (since it is a bug)
> and that is less likely if the message wording is change.

(Had this thread flagged as a TODO for some time, sorry for not
chiming in earlier.)
Yeah, that's clearly a bug in the information provided.

> Your idea would be perfect going forward, though.

We have a few logs that already track this information, but perhaps
that's better to track this extra element in the FATAL if you have
log_min_messages at fatal where LOG would not show up? Feel free to
propose a separate patch if you think that this can be improved.

I thought first that this was an issue coming from 70e81861fadd, but
from what I can see the confusion is much older and comes from
ee994272ca50 that has begun mixing the data from the control and the
backup label for the checkpoint record in this FATAL message.

At a27048cbcb58, the check is done based on the copy of the checkpoint
record, and the log is generated based on the checkpoint data in the
control file. 4a92a1c3d1c3 has begun retrieving the replay TLI from
the backup label. v13 and v14 have this issue, but I'm not really
tempted to poke at the beast more than necessary as this code had a
lot of changes in the last couple of years, with few to no complaints
as far as I am aware.

Applied down to v15 where we have xlogrecovery.c, then. Thanks for
the report!
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2025-02-20 02:22:41 RE: ReplicationSlotRelease() crashes when the instance is in the single user mode
Previous Message Masahiko Sawada 2025-02-20 01:31:32 Re: Parallel heap vacuum