Re: Add pg_walinspect function with block info columns
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Michael Paquier <michael@paquier.xyz>,
Melanie Plageman <melanieplageman@gmail.com>, Matthias van de Meent <boekewurm+postgres@gmail.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2023-03-17T07:20:09Z
Lists: pgsql-hackers
Attachments
- v2-0001-Emit-WAL-record-info-via-pg_get_wal_block_info.patch (application/octet-stream) patch v2-0001
On Fri, Mar 17, 2023 at 7:33 AM Peter Geoghegan <pg@bowt.ie> wrote: > > > IIUC, the concern raised so far in this thread is not just on the > > performance of JOIN queries to get both block info and record level > > info, but on ease of using pg_walinspect functions. If > > pg_get_wal_block_info emits the record level information too (which > > turns out to be 50 LOC more), one doesn't have to be expert at writing > > JOIN queries or such, but just can run the function, which actually > > takes way less time (3sec) to scan the same 5mn WAL records [3]. > > That's exactly my concern, yes. As you say, it's not just the > performance aspect. Requiring users to write a needlessly ornamental > query is actively misleading. It suggests that block_ref is distinct > information from the blocks output by pg_get_wal_block_info(). +1 for pg_get_wal_block_info emitting per-record WAL info too along with block info, attached v2 patch does that. IMO, usability wins the race here. -- Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
Commits
-
Add show_data option to pg_get_wal_block_info.
- df4f3ab51730 16.0 landed
-
Show record information in pg_get_wal_block_info.
- 122376f028a0 16.0 landed
-
Fix recent pg_walinspect fpi_length bug.
- bade01cb4dd8 16.0 landed
-
Improve a few things in pg_walinspect
- 0276ae42ddea 16.0 landed
-
Rework design of functions in pg_walinspect
- 5c1b6628075a 16.0 cited
-
pg_walinspect: pg_get_wal_fpi_info() -> pg_get_wal_block_info()
- 9ecb134a93f0 16.0 landed