summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2021-07-16 12:07:30 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2021-07-16 12:07:30 -0400
commit866237a6fa01a128325df41ad39b41ea3363c9a9 (patch)
tree03933ce1e62cd206dd1d74da6078240e5e30ce4b /src/include
parent91a1651057b15809058acb174fead131ef8efab8 (diff)
Advance old-segment horizon properly after slot invalidation
When some slots are invalidated due to the max_slot_wal_keep_size limit, the old segment horizon should move forward to stay within the limit. However, in commit c6550776394e we forgot to call KeepLogSeg again to recompute the horizon after invalidating replication slots. In cases where other slots remained, the limits would be recomputed eventually for other reasons, but if all slots were invalidated, the limits would not move at all afterwards. Repair. Backpatch to 13 where the feature was introduced. Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Reported-by: Marcin Krupowicz <mk@071.ovh> Discussion: https://postgr.es/m/17103-004130e8f27782c9@postgresql.org
Diffstat (limited to 'src/include')
-rw-r--r--src/include/replication/slot.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/replication/slot.h b/src/include/replication/slot.h
index 31362585ecb..12c68ddbd2e 100644
--- a/src/include/replication/slot.h
+++ b/src/include/replication/slot.h
@@ -209,7 +209,7 @@ extern void ReplicationSlotsComputeRequiredLSN(void);
extern XLogRecPtr ReplicationSlotsComputeLogicalRestartLSN(void);
extern bool ReplicationSlotsCountDBSlots(Oid dboid, int *nslots, int *nactive);
extern void ReplicationSlotsDropDBSlots(Oid dboid);
-extern void InvalidateObsoleteReplicationSlots(XLogSegNo oldestSegno);
+extern bool InvalidateObsoleteReplicationSlots(XLogSegNo oldestSegno);
extern void StartupReplicationSlots(void);
extern void CheckPointReplicationSlots(void);