Add SQL functions to monitor the directory contents of replication slots
Michael Paquier <michael@paquier.xyz>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/test_decoding/expected/slot.out | modified | +21 −0 |
| contrib/test_decoding/sql/slot.sql | modified | +6 −0 |
| doc/src/sgml/func.sgml | modified | +73 −0 |
| src/backend/catalog/system_functions.sql | modified | +12 −0 |
| src/backend/utils/adt/genfile.c | modified | +44 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +22 −0 |
| src/test/regress/expected/misc_functions.out | modified | +50 −0 |
| src/test/regress/sql/misc_functions.sql | modified | +21 −0 |
Documentation touched
Discussion
- logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir 13 messages · 2021-10-08 → 2021-11-23