pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rework design of functions in pg_walinspect
Date: Tue, 14 Mar 2023 11:14:44 +0000
Message-ID: <E1pc2c8-003UXc-Cm@gemulon.postgresql.org> (raw)

Rework design of functions in pg_walinspect

This commit reworks a bit the set-returning functions of pg_walinspect,
making them more flexible regarding their end LSN:
- pg_get_wal_records_info()
- pg_get_wal_stats()
- pg_get_wal_block_info()

The end LSNs given to these functions is now handled so as a value
higher than the current LSN of the cluster (insert LSN for a primary, or
replay LSN for a standby) does not raise an error, giving more
flexibility to monitoring queries.  Instead, the functions return
results up to the current LSN, as found at the beginning of each
function call.

As an effect of that, pg_get_wal_records_info_till_end_of_wal() and
pg_get_wal_stats_till_end_of_wal() are now removed from 1.1, as the
existing, equivalent functions are able to offer the same
possibilities.

Author: Bharath Rupireddy
Discussion: https://postgr.es/m/CALj2ACU0_q-o4DSweyaW9NO1KBx-QkN6G_OzYQvpjf3CZVASkg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5c1b6628075a30b4eed6eb5835c2d2734254fa86

Modified Files
--------------
contrib/pg_walinspect/expected/oldextversions.out |  46 ++++-
contrib/pg_walinspect/expected/pg_walinspect.out  |  42 ++---
contrib/pg_walinspect/pg_walinspect--1.0--1.1.sql |   4 +
contrib/pg_walinspect/pg_walinspect.c             | 215 +++++++++-------------
contrib/pg_walinspect/sql/oldextversions.sql      |  19 ++
contrib/pg_walinspect/sql/pg_walinspect.sql       |   6 +-
doc/src/sgml/pgwalinspect.sgml                    |  59 ++----
7 files changed, 184 insertions(+), 207 deletions(-)



Message-ID: <E1pc2c8-003UXc-Cm@gemulon.postgresql.org>
Permalink:  ../E1pc2c8-003UXc-Cm@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pc2c8-003UXc-Cm@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Rework design of functions in pg_walinspect
  In-Reply-To: <E1pc2c8-003UXc-Cm@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox