summaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2025-12-05 04:12:55 +0000
committerAmit Kapila <akapila@postgresql.org>2025-12-05 04:12:55 +0000
commit5db6a344abc2dfbc5df454cd93a096443ea4dd3e (patch)
treed1c3fd4d90735d3072ed13f213f532e743003c41 /src/backend/utils
parent7bc88c3d6f3af3af5330c0e209c8a3c411267d00 (diff)
Rename column slotsync_skip_at to slotsync_last_skip.
Commit 76b78721ca introduced two new columns in pg_stat_replication_slots to improve monitoring of slot synchronization. One of these columns was named slotsync_skip_at, which is inconsistent with the naming convention used for similar columns in other system views. Columns that store timestamps of the most recent event typically use the 'last_' in the column name (e.g., last_autovacuum, checksum_last_failure). Renaming slotsync_skip_at to slotsync_last_skip aligns with this pattern, making the purpose of the column clearer and improving overall consistency across the views. Author: Shlok Kyal <shlok.kyal.oss@gmail.com> Reviewed-by: Michael Banck <mbanck@gmx.net> Discussion: https://postgr.es/m/20251128091552.GB13635@p46.dedyn.io;lightning.p46.dedyn.io Discussion: https://postgr.es/m/CAE9k0PkhfKrTEAsGz4DjOhEj1nQ+hbQVfvWUxNacD38ibW3a1g@mail.gmail.com
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/activity/pgstat_replslot.c2
-rw-r--r--src/backend/utils/adt/pgstatfuncs.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/activity/pgstat_replslot.c b/src/backend/utils/activity/pgstat_replslot.c
index e08d33e8b4c..d757e00eb54 100644
--- a/src/backend/utils/activity/pgstat_replslot.c
+++ b/src/backend/utils/activity/pgstat_replslot.c
@@ -127,7 +127,7 @@ pgstat_report_replslotsync(ReplicationSlot *slot)
statent = &shstatent->stats;
statent->slotsync_skip_count += 1;
- statent->slotsync_skip_at = GetCurrentTimestamp();
+ statent->slotsync_last_skip = GetCurrentTimestamp();
pgstat_unlock_entry(entry_ref);
}
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 7e2ed69138a..ef6fffe60b9 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -2162,7 +2162,7 @@ pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
INT8OID, -1, 0);
TupleDescInitEntry(tupdesc, (AttrNumber) 11, "slotsync_skip_count",
INT8OID, -1, 0);
- TupleDescInitEntry(tupdesc, (AttrNumber) 12, "slotsync_skip_at",
+ TupleDescInitEntry(tupdesc, (AttrNumber) 12, "slotsync_last_skip",
TIMESTAMPTZOID, -1, 0);
TupleDescInitEntry(tupdesc, (AttrNumber) 13, "stats_reset",
TIMESTAMPTZOID, -1, 0);
@@ -2192,10 +2192,10 @@ pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
values[9] = Int64GetDatum(slotent->total_bytes);
values[10] = Int64GetDatum(slotent->slotsync_skip_count);
- if (slotent->slotsync_skip_at == 0)
+ if (slotent->slotsync_last_skip == 0)
nulls[11] = true;
else
- values[11] = TimestampTzGetDatum(slotent->slotsync_skip_at);
+ values[11] = TimestampTzGetDatum(slotent->slotsync_last_skip);
if (slotent->stat_reset_timestamp == 0)
nulls[12] = true;