Add slotsync_skip_reason column to pg_replication_slots view.
authorAmit Kapila <akapila@postgresql.org>
Fri, 28 Nov 2025 05:21:35 +0000 (05:21 +0000)
committerAmit Kapila <akapila@postgresql.org>
Fri, 28 Nov 2025 05:21:35 +0000 (05:21 +0000)
commite68b6adad96d414fdf24e072fdb1d41fb4b8f0b7
tree36cbdc3befc3b490893d4daa2184aa664ca46adb
parent9ccc049dfe655ca9927f7c62559ec32f4d1f94dd
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.kyal.oss@gmail.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Ashutosh Sharma <ashu.coek88@gmail.com>
Reviewed-by: Hou Zhijie <houzj.fnst@fujitsu.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/CAE9k0PkhfKrTEAsGz4DjOhEj1nQ+hbQVfvWUxNacD38ibW3a1g@mail.gmail.com
13 files changed:
doc/src/sgml/monitoring.sgml
doc/src/sgml/system-views.sgml
src/backend/catalog/system_views.sql
src/backend/replication/logical/slotsync.c
src/backend/replication/slot.c
src/backend/replication/slotfuncs.c
src/backend/utils/activity/pgstat_replslot.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.dat
src/include/replication/slot.h
src/test/recovery/t/040_standby_failover_slots_sync.pl
src/test/regress/expected/rules.out
src/tools/pgindent/typedefs.list