Re: pg_wal_summary_contents() and pg_walsummary may return different results on the same WAL summary file
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2024-07-04T10:16:16Z
Lists: pgsql-hackers
Attachments
- v2-0001-Fix-bugs-in-pg_wal_summary_contents.patch (text/plain) patch v2-0001
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 appears to 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 version of 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
Commits
-
Fix limit block handling in pg_wal_summary_contents().
- ab4129091ccc 17.0 landed
- c8d5d6c78af4 18.0 landed