Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL
Date
Msg-id aWc08L0FJLWeXX5v@paquier.xyz
Whole thread Raw
In response to Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL  (Andrey Borodin <x4mmm@yandex-team.ru>)
List pgsql-hackers
On Tue, Jan 13, 2026 at 01:20:23PM +0500, Andrey Borodin wrote:
> But this particular test of pg_waldump fails due to LSN comparison logic.
> The test expects LSN in saved file to be strictly less than LSN in file name.
> This is violated when wal_consistency_checking is enabled: LSNs are equal.
>
> Maybe we can relax the test here?

Due to the fact that with wal_consistency_checking the block is
copied in the WAL record on a consistent basis.  Fun.

There is actually an argument for a backpatch, on top of being able to
enable wal_consistency_checking across the board in stable branches
(which has value on its own).  The only reason why the test is not
hitting this failure today is that we would need a needs_backup to be
set when inserting a record to see a block with a LSN value matching,
which could in theory happen if the test is really slow with
concurrent activity that touches a page LSN, or if we add much more
queries to it at some point.  Unlikely so, still, you have a point.  I
will address that shortly, thanks for the report!
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: JumbleQuery ma treat different GROUP BY expr as the same
Next
From: Andreas Karlsson
Date:
Subject: Re: Remove header lock BufferGetLSNAtomic() on architectures with 64 bit atomic operations