pgsql: Rework design of functions in pg_walinspect - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Rework design of functions in pg_walinspect
Date
Msg-id E1pc2c8-003UXc-Cm@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Dean Rasheed
Date:
Subject: pgsql: Add support for the error functions erf() and erfc().
Next
From: Daniel Gustafsson
Date:
Subject: pgsql: doc: spell out full productname