Thread: pgsql: Add min() and max() aggregates for pg_lsn

pgsql: Add min() and max() aggregates for pg_lsn

From
Michael Paquier
Date:
Add min() and max() aggregates for pg_lsn

This is useful for monitoring, when it comes for example to calculations
of WAL retention with replication slots and delays with a set of
standbys.

Bump catalog version.

Author: Fabrízio de Royes Mello
Reviewed-by: Surafel Temesgen
Discussion: https://postgr.es/m/CAFcNs+oc8ZoHhowA4rR1GGCgG8QNgK_TOwPRVYQo5rYy8_PXzA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/313f87a17155a6dbd27a3ce687cf59bd171fe75e

Modified Files
--------------
doc/src/sgml/func.sgml               |  4 ++--
src/backend/utils/adt/pg_lsn.c       | 18 ++++++++++++++++++
src/include/catalog/catversion.h     |  2 +-
src/include/catalog/pg_aggregate.dat |  6 ++++++
src/include/catalog/pg_proc.dat      | 12 ++++++++++++
src/test/regress/expected/pg_lsn.out |  7 +++++++
src/test/regress/sql/pg_lsn.sql      |  4 ++++
7 files changed, 50 insertions(+), 3 deletions(-)