From 92a3041be5ed9ce33d1aebf3f8381ecbf0e01b1b Mon Sep 17 00:00:00 2001 From: Zhijie Hou Date: Thu, 3 Sep 2026 11:35:06 +0800 Subject: [PATCH v2] Remove stale XXX comment in logical launcher An XXX comment in launcher.c questioned why the slot drop does not request disabling logical decoding. But the conflict detection slot is a physical slot, so there is no logical decoding state to disable. Remove the comment and add an explanation atop the slot creation function clarifying that the slot is physical. --- src/backend/replication/logical/launcher.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c index 313e31ff2e3..4e5c05b1164 100644 --- a/src/backend/replication/logical/launcher.c +++ b/src/backend/replication/logical/launcher.c @@ -1406,7 +1406,6 @@ ApplyLauncherMain(Datum main_arg) if (MyReplicationSlot) { if (!retain_dead_tuples) - /* XXX unclear why we don't request logical decoding disable */ ReplicationSlotDropAcquired(false); else if (can_update_xmin) update_conflict_slot_xmin(xmin); @@ -1564,6 +1563,11 @@ init_conflict_slot_xmin(void) /* * Create and acquire the replication slot used to retain information for * conflict detection, if not yet. + * + * The slot is necessarily physical: it is not tied to any database and no + * logical decoding is ever performed on it; only its xmin horizon is used to + * prevent the removal of dead tuples and commit timestamp data required + * by subscriptions with retain_dead_tuples enabled in any database. */ void CreateConflictDetectionSlot(void) -- 2.43.0