pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Add slotsync skip statistics.
2+ messages / 2 participants
[nested] [flat]
* pgsql: Add slotsync skip statistics.
@ 2025-11-25 07:36 Amit Kapila <akapila@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: Amit Kapila @ 2025-11-25 07:36 UTC (permalink / raw)
To: pgsql-committers@lists.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
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(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: pgsql: Add slotsync skip statistics.
@ 2025-11-25 11:58 Amit Kapila <amit.kapila16@gmail.com>
parent: Amit Kapila <akapila@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Amit Kapila @ 2025-11-25 11:58 UTC (permalink / raw)
To: Amit Kapila <akapila@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org
On Tue, Nov 25, 2025 at 1:07 PM Amit Kapila <akapila@postgresql.org> wrote:
>
> Add slotsync skip statistics.
>
The test added by this commit caused two BF failures as reported in
email [1]. The analysis and patch to fix the problem is also proposed
in a later email [2]. This is a test-only issue causing random
failures. I would like to review it with fresh eyes tomorrow morning
and commit the proposed patch unless I find something. Sorry for the
inconvenience.
[1] - https://www.postgresql.org/message-id/OSCPR01MB14966FE0BFB6C212298BFFEDEF5D1A%40OSCPR01MB14966.jpnpr...
[2] - https://www.postgresql.org/message-id/TY4PR01MB169070A4CA8D544ACDFB1191094D1A%40TY4PR01MB16907.jpnpr...
--
With Regards,
Amit Kapila.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-11-25 11:58 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-11-25 07:36 pgsql: Add slotsync skip statistics. Amit Kapila <akapila@postgresql.org>
2025-11-25 11:58 ` Amit Kapila <amit.kapila16@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox