aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2024-11-25 10:58:06 +0530
committerAmit Kapila <akapila@postgresql.org>2024-11-25 10:58:06 +0530
commit5f46439d5931c518b670058e66849d7994f07588 (patch)
tree4b17c7bfdb1b3400ca9974e40d8674f8c7f897d9 /src
parent1a52069914ebf81ab8591f5b451fc9099529c211 (diff)
downloadpostgresql-5f46439d5931c518b670058e66849d7994f07588.tar.gz
postgresql-5f46439d5931c518b670058e66849d7994f07588.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/logical/slotsync.c2
-rw-r--r--src/include/replication/slot.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/replication/logical/slotsync.c b/src/backend/replication/logical/slotsync.c
index ebfbaebe16c..73fe3f56af2 100644
--- a/src/backend/replication/logical/slotsync.c
+++ b/src/backend/replication/logical/slotsync.c
@@ -1516,7 +1516,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 c9675ee87cc..07561bc4742 100644
--- a/src/include/replication/slot.h
+++ b/src/include/replication/slot.h
@@ -202,7 +202,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;