Add slotsync_skip_reason column to pg_replication_slots view.
Amit Kapila <akapila@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/monitoring.sgml | modified | +2 −2 |
| doc/src/sgml/system-views.sgml | modified | +43 −0 |
| src/backend/catalog/system_views.sql | modified | +2 −1 |
| src/backend/replication/logical/slotsync.c | modified | +38 −5 |
| src/backend/replication/slot.c | modified | +1 −0 |
| src/backend/replication/slotfuncs.c | modified | +17 −1 |
| src/backend/utils/activity/pgstat_replslot.c | modified | +2 −2 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +3 −3 |
| src/include/replication/slot.h | modified | +30 −0 |
| src/test/recovery/t/040_standby_failover_slots_sync.pl | modified | +6 −0 |
| src/test/regress/expected/rules.out | modified | +3 −2 |
| src/tools/pgindent/typedefs.list | modified | +1 −0 |
Discussion
- How can end users know the cause of LR slot sync delays? 75 messages · 2025-08-28 → 2025-12-05