Re: Strengthen pg_waldump's --save-fullpage tests - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Strengthen pg_waldump's --save-fullpage tests
Date
Msg-id Y74Kmd4vGQuHeZTF@paquier.xyz
Whole thread Raw
In response to Re: Strengthen pg_waldump's --save-fullpage tests  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Responses Re: Strengthen pg_waldump's --save-fullpage tests
List pgsql-hackers
On Tue, Jan 10, 2023 at 05:25:44PM +0100, Drouvot, Bertrand wrote:
> I like the idea of comparing the full page (and not just the LSN) but
> I'm not sure that adding the pageinspect dependency is a good thing.
>
> What about extracting the block directly from the relation file and
> comparing it with the one extracted from the WAL? (We'd need to skip the
> first 8 bytes to skip the LSN though).

Byte-by-byte counting for the page hole?  The page checksum would
matter as well, FWIW, as it is not set in WAL and a FPW logged in WAL
means that the page got modified.  It means that it could have been
flushed, updating its pd_lsn and its pd_checksum on the way.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] support tab-completion for single quote input with equal sign
Next
From: Nathan Bossart
Date:
Subject: delay starting WAL receiver