pgsql: Show record information in pg_get_wal_block_info.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Show record information in pg_get_wal_block_info.
Date: 2023-03-30 19:27:14
Message-ID: E1phxvU-000WOg-Sk@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Show record information in pg_get_wal_block_info.

Expand the output parameters in pg_walinspect's pg_get_wal_block_info
function to return additional information that was previously only
available from pg_walinspect's pg_get_wal_records_info function. Some
of the details are attributed to individual block references, rather
than aggregated into whole-record values, since the function returns one
row per block reference per WAL record (unlike pg_get_wal_records_info,
which always returns one row per WAL record).

This structure is much easier to work with when writing queries that
track how individual blocks changed over time, or when attributing costs
to individual blocks (not WAL records) is useful.

This is the second time that pg_get_wal_block_info has been enhanced in
recent weeks. Commit 9ecb134a expanded on the original version of the
function added in commit c31cf1c0 (where it first appeared under the
name pg_get_wal_fpi_info). There still hasn't been a stable release
since commit c31cf1c0, so no bump in the pg_walinspect extension
version.

Author: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Author: Peter Geoghegan <pg(at)bowt(dot)ie>
Reviewed-By: Peter Geoghegan <pg(at)bowt(dot)ie>
Reviewed-By: Kyotaro HORIGUCHI <horikyota(dot)ntt(at)gmail(dot)com>
Discussion: https://postgr.es/m/CALj2ACVRK5=Z+2ZVsjgTTSkfEnQzCuwny7iigpG7g1btk4Ws2A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/122376f028a0e31b91d6c6bad2a9a6e994708547

Modified Files
--------------
contrib/pg_walinspect/expected/pg_walinspect.out | 4 +-
contrib/pg_walinspect/pg_walinspect--1.0--1.1.sql | 23 ++-
contrib/pg_walinspect/pg_walinspect.c | 197 +++++++++++++--------
contrib/pg_walinspect/sql/pg_walinspect.sql | 4 +-
doc/src/sgml/pgwalinspect.sgml | 205 ++++++++++++++--------
5 files changed, 273 insertions(+), 160 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2023-03-30 20:29:36 Re: pgsql: Clean up role created in new subscription test.
Previous Message Daniel Gustafsson 2023-03-30 19:19:17 Re: pgsql: Clean up role created in new subscription test.