diff options
| author | Amit Kapila <akapila@postgresql.org> | 2025-12-05 04:12:55 +0000 |
|---|---|---|
| committer | Amit Kapila <akapila@postgresql.org> | 2025-12-05 04:12:55 +0000 |
| commit | 5db6a344abc2dfbc5df454cd93a096443ea4dd3e (patch) | |
| tree | d1c3fd4d90735d3072ed13f213f532e743003c41 /src/backend/utils/adt | |
| parent | 7bc88c3d6f3af3af5330c0e209c8a3c411267d00 (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/adt')
| -rw-r--r-- | src/backend/utils/adt/pgstatfuncs.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |
