Add slotsync skip statistics.
Amit Kapila <akapila@postgresql.org>
Add slotsync skip statistics. This patch adds two new columns to the pg_stat_replication_slots view: slotsync_skip_count - the total number of times a slotsync operation was skipped. slotsync_skip_at - the timestamp of the most recent skip. These additions provide better visibility into replication slot synchronization behavior. A future patch will introduce the slotsync_skip_reason column in pg_replication_slots to capture the reason for skip. 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: Amit Kapila <amit.kapila16@gmail.com> Discussion: https://postgr.es/m/CAE9k0PkhfKrTEAsGz4DjOhEj1nQ+hbQVfvWUxNacD38ibW3a1g@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/test_decoding/expected/stats.out | modified | +6 −6 |
| doc/src/sgml/monitoring.sgml | modified | +24 −0 |
| src/backend/catalog/system_views.sql | modified | +2 −0 |
| src/backend/replication/logical/slotsync.c | modified | +66 −23 |
| src/backend/utils/activity/pgstat_replslot.c | modified | +31 −1 |
| src/backend/utils/adt/pgstatfuncs.c | modified | +14 −4 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +3 −3 |
| src/include/pgstat.h | modified | +4 −1 |
| src/test/recovery/t/040_standby_failover_slots_sync.pl | modified | +58 −2 |
| src/test/regress/expected/rules.out | modified | +3 −1 |
Discussion
- How can end users know the cause of LR slot sync delays? 75 messages · 2025-08-28 → 2025-12-05