pgsql: Add slotsync_skip_reason column to pg_replication_slots view.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add slotsync_skip_reason column to pg_replication_slots view.
Date: 2025-11-28 05:32:02
Message-ID: E1vOr5N-001lsq-2Z@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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 <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Reviewed-by: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Reviewed-by: Hayato Kuroda <kuroda(dot)hayato(at)fujitsu(dot)com>
Reviewed-by: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
Reviewed-by: Hou Zhijie <houzj(dot)fnst(at)fujitsu(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAE9k0PkhfKrTEAsGz4DjOhEj1nQ+hbQVfvWUxNacD38ibW3a1g@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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2025-11-28 07:39:15 pgsql: Fix pg_isblank()
Previous Message Michael Paquier 2025-11-28 00:04:59 pgsql: pg_buffercache: Add pg_buffercache_mark_dirty{,_relation,_all}()