| From: | Amit Kapila <akapila(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add slotsync skip statistics. |
| Date: | 2025-11-25 07:36:54 |
| Message-ID: | E1vNnbZ-001Ifu-2E@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(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: 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/76b78721ca49c16dfcbfbd2f4f87fcdb2db2bbb6
Modified Files
--------------
contrib/test_decoding/expected/stats.out | 12 +--
doc/src/sgml/monitoring.sgml | 24 ++++++
src/backend/catalog/system_views.sql | 2 +
src/backend/replication/logical/slotsync.c | 89 ++++++++++++++++------
src/backend/utils/activity/pgstat_replslot.c | 32 +++++++-
src/backend/utils/adt/pgstatfuncs.c | 18 ++++-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 6 +-
src/include/pgstat.h | 5 +-
.../recovery/t/040_standby_failover_slots_sync.pl | 60 ++++++++++++++-
src/test/regress/expected/rules.out | 4 +-
11 files changed, 212 insertions(+), 42 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2025-11-25 09:00:19 | pgsql: Fix a BF failure caused by commit 76b78721ca. |
| Previous Message | Peter Eisentraut | 2025-11-25 05:32:18 | pgsql: Remove obsolete comment |