Add slotsync_skip_reason column to pg_replication_slots view.

Introduce a new column, slotsync_skip_reason, in the pg_replication_slots
view. This column records the reason why the last slot synchronization was
skipped. It is primarily relevant for logical replication slots on standby
servers where the 'synced' field is true. The value is NULL when
synchronization succeeds.

Author: Shlok Kyal <[email protected]>
Reviewed-by: shveta malik <[email protected]>
Reviewed-by: Hayato Kuroda <[email protected]>
Reviewed-by: Ashutosh Sharma <[email protected]>
Reviewed-by: Hou Zhijie <[email protected]>
Reviewed-by: Amit Kapila <[email protected]>
Discussion: 
https://postgr.es/m/cae9k0pkhfkrteasgz4djohej1nq+hbqvfvwuxnacd38ibw3...@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e68b6adad96d414fdf24e072fdb1d41fb4b8f0b7

Modified Files
--------------
doc/src/sgml/monitoring.sgml                       |  4 +-
doc/src/sgml/system-views.sgml                     | 43 ++++++++++++++++++++++
src/backend/catalog/system_views.sql               |  3 +-
src/backend/replication/logical/slotsync.c         | 43 +++++++++++++++++++---
src/backend/replication/slot.c                     |  1 +
src/backend/replication/slotfuncs.c                | 18 ++++++++-
src/backend/utils/activity/pgstat_replslot.c       |  4 +-
src/include/catalog/catversion.h                   |  2 +-
src/include/catalog/pg_proc.dat                    |  6 +--
src/include/replication/slot.h                     | 30 +++++++++++++++
.../recovery/t/040_standby_failover_slots_sync.pl  |  6 +++
src/test/regress/expected/rules.out                |  5 ++-
src/tools/pgindent/typedefs.list                   |  1 +
13 files changed, 149 insertions(+), 17 deletions(-)

Reply via email to