Re: pg_wal_summary_contents() and pg_walsummary may return different results on the same WAL summary file - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: pg_wal_summary_contents() and pg_walsummary may return different results on the same WAL summary file
Date
Msg-id 71c59c8d-35f1-46a9-adba-c614ec001898@oss.nttdata.com
Whole thread Raw
In response to Re: pg_wal_summary_contents() and pg_walsummary may return different results on the same WAL summary file  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pg_wal_summary_contents() and pg_walsummary may return different results on the same WAL summary file
List pgsql-hackers

On 2024/07/03 22:42, Robert Haas wrote:
> On Wed, Jul 3, 2024 at 5:34 AM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>> pg_wal_summary_contents() seems to miss the summary information with "limit" that pg_walsummary reports. This
appearsto be a bug. The attached patch fixes this.
 
> 
> Oops. It looks like pg_wal_summary_contents() forgets to emit the
> limit block when that's the only data for a particular relation fork.
> And maybe you can make it emit the limit block multiple times if the
> list of block numbers is long enough.
> 
> Thanks for the patch. I think you can commit and back-patch this, but
> I don't think the commit message is quite right, because it's not like
> this code just NEVER executes where it is located currently. Or am I
> missing something?

Yes, so I updated the commit message. I borrowed your description and used it in the message. Attached is the revised
versionof the patch.
 

If there are no objections, I will commit and backpatch it.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
Attachment

pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: Grammar guidelines in Postgres
Next
From: Mohab Yaser
Date:
Subject: Problem while installing PostgreSQL using make