From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add SQL functions to monitor the directory contents of replicati
Date: Tue, 23 Nov 2021 10:32:30 +0000
Message-ID: <E1mpT6E-0005ke-Mb@gemulon.postgresql.org> (raw)
Add SQL functions to monitor the directory contents of replication slots
This commit adds a set of functions able to look at the contents of
various paths related to replication slots:
- pg_ls_logicalsnapdir, for pg_logical/snapshots/
- pg_ls_logicalmapdir, for pg_logical/mappings/
- pg_ls_replslotdir, for pg_replslot/<slot_name>/
These are intended to be used by monitoring tools. Unlike pg_ls_dir(),
execution permission can be granted to non-superusers. Roles members of
pg_monitor gain have access to those functions.
Bump catalog version.
Author: Bharath Rupireddy
Reviewed-by: Nathan Bossart, Justin Pryzby
Discussion: https://postgr.es/m/CALj2ACWsfizZjMN6bzzdxOk1ADQQeSw8HhEjhmVXn_Pu+7VzLw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1922d7c6e1a74178bd2f1d5aa5a6ab921b3fcd34
Modified Files
--------------
contrib/test_decoding/expected/slot.out | 21 ++++++++
contrib/test_decoding/sql/slot.sql | 6 +++
doc/src/sgml/func.sgml | 73 ++++++++++++++++++++++++++++
src/backend/catalog/system_functions.sql | 12 +++++
src/backend/utils/adt/genfile.c | 44 +++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 22 +++++++++
src/test/regress/expected/misc_functions.out | 50 +++++++++++++++++++
src/test/regress/sql/misc_functions.sql | 21 ++++++++
9 files changed, 250 insertions(+), 1 deletion(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Add SQL functions to monitor the directory contents of replicati
In-Reply-To: <E1mpT6E-0005ke-Mb@gemulon.postgresql.org>
References: <E1mpT6E-0005ke-Mb@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