Re: Add a new pg_walinspect function to extract FPIs from WAL records

2023-01-22 Thread Michael Paquier
On Thu, Jan 12, 2023 at 05:37:40PM +0530, Bharath Rupireddy wrote: > I understand. I don't mind discussing something like [1] with the > following behaviour and discarding till_end_of_wal functions > altogether: > If start_lsn is NULL, error out/return NULL. > If end_lsn isn't specified, default

Re: Add a new pg_walinspect function to extract FPIs from WAL records

2023-01-12 Thread Bharath Rupireddy
On Thu, Jan 12, 2023 at 11:23 AM Michael Paquier wrote: > > On Wed, Jan 11, 2023 at 06:59:18PM +0530, Bharath Rupireddy wrote: > > I've done it that way for pg_get_wal_fpi_info. If this format looks > > okay, I can propose to do the same for other functions (for > > backpatching too) in a

Re: Add a new pg_walinspect function to extract FPIs from WAL records

2023-01-11 Thread Michael Paquier
On Wed, Jan 11, 2023 at 06:59:18PM +0530, Bharath Rupireddy wrote: > I've done it that way for pg_get_wal_fpi_info. If this format looks > okay, I can propose to do the same for other functions (for > backpatching too) in a separate thread though. My vote would be to make that happen first, to

Re: Add a new pg_walinspect function to extract FPIs from WAL records

2023-01-11 Thread Bharath Rupireddy
On Wed, Jan 11, 2023 at 10:07 AM Michael Paquier wrote: > > +postgres=# SELECT lsn, tablespace_oid, database_oid, relfile_number, > block_number, fork_name, length(fpi) > 0 as fpi_ok FROM > pg_get_wal_fpi_info('0/7418E60', '0/7518218'); > > This query in the docs is too long IMO. Could you split

Re: Add a new pg_walinspect function to extract FPIs from WAL records

2023-01-10 Thread Michael Paquier
On Tue, Jan 10, 2023 at 09:29:03AM +0100, Drouvot, Bertrand wrote: > Thanks for updating the patch! > > +-- Compare FPI from WAL record and page from table, they must be same > > I think "must be the same" or "must be identical" sounds better (but not 100% > sure). > > Except this nit, V4

Re: Add a new pg_walinspect function to extract FPIs from WAL records

2023-01-10 Thread Drouvot, Bertrand
Hi, On 1/6/23 6:41 PM, Bharath Rupireddy wrote: On Fri, Jan 6, 2023 at 11:47 AM Bharath Rupireddy wrote: On Thu, Jan 5, 2023 at 6:51 PM Bharath Rupireddy wrote: I'm also wondering if it would make sense to extend the test coverage of it (and pg_waldump) to "validate" that both extracted

Re: Add a new pg_walinspect function to extract FPIs from WAL records

2023-01-06 Thread Bharath Rupireddy
On Fri, Jan 6, 2023 at 11:47 AM Bharath Rupireddy wrote: > > On Thu, Jan 5, 2023 at 6:51 PM Bharath Rupireddy > wrote: > > > > > I'm also wondering if it would make sense to extend the test coverage of > > > it (and pg_waldump) to "validate" that both > > > extracted images are the same and

Re: Add a new pg_walinspect function to extract FPIs from WAL records

2023-01-05 Thread Bharath Rupireddy
On Thu, Jan 5, 2023 at 6:51 PM Bharath Rupireddy wrote: > > > I'm also wondering if it would make sense to extend the test coverage of it > > (and pg_waldump) to "validate" that both > > extracted images are the same and matches the one modified right after the > > checkpoint. > > > > What do

Re: Add a new pg_walinspect function to extract FPIs from WAL records

2023-01-05 Thread vignesh C
On Thu, 5 Jan 2023 at 18:52, Bharath Rupireddy wrote: > > On Wed, Jan 4, 2023 at 8:19 PM Drouvot, Bertrand > wrote: > > > > I think it makes sense to somehow align the pg_walinspect functions with > > the pg_waldump "features". > > And since [1] added FPI "extraction" then +1 for the proposed

Re: Add a new pg_walinspect function to extract FPIs from WAL records

2023-01-05 Thread Bharath Rupireddy
On Wed, Jan 4, 2023 at 8:19 PM Drouvot, Bertrand wrote: > > I think it makes sense to somehow align the pg_walinspect functions with the > pg_waldump "features". > And since [1] added FPI "extraction" then +1 for the proposed patch in this > thread. > > > [1] > >

Re: Add a new pg_walinspect function to extract FPIs from WAL records

2023-01-04 Thread Drouvot, Bertrand
Hi, On 12/27/22 12:48 PM, Bharath Rupireddy wrote: Hi, Here's a patch that implements the idea of extracting full page images from WAL records [1] [2] with a function in pg_walinspect. This new function accepts start and end lsn and returns full page image info such as WAL record lsn,

Add a new pg_walinspect function to extract FPIs from WAL records

2022-12-27 Thread Bharath Rupireddy
Hi, Here's a patch that implements the idea of extracting full page images from WAL records [1] [2] with a function in pg_walinspect. This new function accepts start and end lsn and returns full page image info such as WAL record lsn, tablespace oid, database oid, relfile number, block number,