Re: Strengthen pg_waldump's --save-fullpage tests

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Strengthen pg_waldump's --save-fullpage tests
Date: 2023-01-11 09:56:54
Message-ID: 5c98ff42-1d41-9a6b-4d48-d9be16af9c3d@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 1/11/23 5:17 AM, Bharath Rupireddy wrote:
> On Wed, Jan 11, 2023 at 6:32 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>>
>> 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?

I've in mind to use diff on the whole page (minus the LSN).

>> The page checksum would
>> matter as well,

Right, but the TAP test is done without checksum and we could also
skip the checksum from the page if we really want to.

> Right. LSN of FPI from the WAL record and page from the table won't be
> the same, essentially FPI LSN <= table page.

Right, that's why I proposed to exclude it for the comparison.

What about something like the attached?

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v2-0001-Strengthen-pg_waldump-s-save-fullpage-tests.patch text/plain 3.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2023-01-11 09:57:13 Re: Time delayed LR (WAS Re: logical replication restrictions)
Previous Message John Naylor 2023-01-11 09:56:25 Re: [PoC] Improve dead tuple storage for lazy vacuum