pgsql: Improve a few things in pg_walinspect

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve a few things in pg_walinspect
Date: 2023-03-27 04:15:52
Message-ID: E1pgeGu-005a1f-BE@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve a few things in pg_walinspect

This improves a few things in pg_walinspect:
- Return NULL rather than empty strings in pg_get_wal_records_info() for
the block references and the record description if there is no
information provided by the fallback. This point has been raised by
Peter Geoghegan.
- Add a check on XLogRecHasAnyBlockRefs() for pg_get_wal_block_info(),
to directly skip records that have no block references. This speeds up
the function a bit, depending on the number of records that have no
block references.

Author: Bharath Rupireddy
Reviewed-by: Kyotaro Horiguchi, Michael Paquier
Discussion: https://postgr.es/m/CALj2ACWL9RG8sGJHinggRNBTxgRWJTSxCkB+cE6=t3Phh=Ey+A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0276ae42ddea02682f514aaea449f183229ddbbc

Modified Files
--------------
contrib/pg_walinspect/pg_walinspect.c | 42 ++++++++++++++++++++++-------------
1 file changed, 27 insertions(+), 15 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2023-03-27 07:19:42 pgsql: meson: Fix support for empty darwin sysroot
Previous Message Michael Paquier 2023-03-27 00:57:59 pgsql: Generate pg_stat_get_xact*() functions for relations using macro