From d05a387d9d78a65db2c960d4f309a2649d183066 Mon Sep 17 00:00:00 2001 From: Amit Kapila Date: Mon, 25 Nov 2024 11:12:32 +0530 Subject: Doc: Clarify the `inactive_since` field description. Updated to specify that it represents the exact time a slot became inactive, rather than the period of inactivity. Reported-by: Peter Smith Author: Bruce Momjian, Nisha Moond Reviewed-by: Amit Kapila, Peter Smith Backpatch-through: 17 Discussion: https://postgr.es/m/CAHut+PuvsyA5v8y7rYoY9mkDQzUhwaESM05yCByTMaDoRh30tA@mail.gmail.com --- src/backend/replication/logical/slotsync.c | 2 +- src/include/replication/slot.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/backend/replication/logical/slotsync.c b/src/backend/replication/logical/slotsync.c index d62186a5107..f4f80b23129 100644 --- a/src/backend/replication/logical/slotsync.c +++ b/src/backend/replication/logical/slotsync.c @@ -1515,7 +1515,7 @@ update_synced_slots_inactive_since(void) * correctly interpret the inactive_since if the standby gets promoted * without a restart. We don't want the slots to appear inactive for a * long time after promotion if they haven't been synchronized recently. - * Whoever acquires the slot i.e.makes the slot active will reset it. + * Whoever acquires the slot, i.e., makes the slot active, will reset it. */ if (!StandbyMode) return; diff --git a/src/include/replication/slot.h b/src/include/replication/slot.h index 45582cf9d89..d2cf786fd57 100644 --- a/src/include/replication/slot.h +++ b/src/include/replication/slot.h @@ -205,7 +205,11 @@ typedef struct ReplicationSlot */ XLogRecPtr last_saved_confirmed_flush; - /* The time since the slot has become inactive */ + /* + * The time when the slot became inactive. For synced slots on a standby + * server, it represents the time when slot synchronization was most + * recently stopped. + */ TimestampTz inactive_since; } ReplicationSlot; -- cgit v1.2.3