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

From Bharath Rupireddy
Subject Strengthen pg_waldump's --save-fullpage tests
Date
Msg-id CALj2ACU3xOsGGhNZpcMCXKp4P6PHbpcOTxMyFPgYJRWKmc6bGQ@mail.gmail.com
Whole thread Raw
Responses Re: Strengthen pg_waldump's --save-fullpage tests
List pgsql-hackers
Hi,

A recent commit [1] added --save-fullpage option to pg_waldump to
extract full page images (FPI) from WAL records and save them into
files (one file per FPI) under a specified directory. While it added
tests to check the LSN from the FPI file name and the FPI file
contents, it missed to further check the FPI contents like the tuples
on the page. I'm attaching a patch that basically reads the FPI file
(saved by pg_waldump) contents and raw page from the table file (using
pageinspect extension) and compares the tuples from both of them. This
test ensures that the pg_waldump outputs the correct FPI. This idea is
also discussed elsewhere [2].

Thoughts?

[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=d497093cbecccf6df26365e06a5f8f8614b591c8
[2] https://www.postgresql.org/message-id/CALj2ACXesN9DTjgsekM8fig7CxhhxQfQP4fCiSJgcmp9wrZOvA@mail.gmail.com

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

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Fixing a couple of buglets in how VACUUM sets visibility map bits
Next
From: Andrey Borodin
Date:
Subject: Re: Amcheck verification of GiST and GIN