Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x3qao-006hpG-1c for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Sep 2026 07:50:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x3qan-005TOh-1Q for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Sep 2026 07:50:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x3qan-005TOY-07 for pgsql-hackers@lists.postgresql.org; Tue, 08 Sep 2026 07:50:09 +0000 Received: from flow-a5-smtp.messagingengine.com ([103.168.172.140]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x3qak-00000003XWL-1kHD for pgsql-hackers@postgresql.org; Tue, 08 Sep 2026 07:50:08 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailflow.phl.internal (Postfix) with ESMTP id 52421138020B; Tue, 8 Sep 2026 03:50:05 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Tue, 08 Sep 2026 03:50:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1788853805; x= 1788861005; bh=qUqf1SRJw5TpKU3xzGucSzwFQYERMv4ax3bkONd1e5c=; b=t h4E9xuUkvQMTj9B3FXUY4zA2QcATaXokDRsYB63FoiIlEXeIyO+1EQCjkEMEN11L i3g1DIElRFH2KryaAU4kIEqdQCQjXRMOFjJ07J+etSxHVyF1AA0ZAR51foAlFZt6 Pr1zLJkHPTtOvCyDEKxwrATr1ObXAsesk6tiJwsqujRbwc+m+IWfkDR/wbJku2sU QVd9ATDwjlN7SSISZVWADkU3Yrhzu+CenjTnyVi0Qr6bjWzhQR/JIEVlIS32kwj/ 2LFCFPZyMK7mluyPeojQMa7YaA3UP7K2BHbgY8KNj2z1CwA8R+vulKEkRmGgEO1U G3l7XdCdNx8UkJFxRpazQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1788853805; x=1788861005; bh=q Uqf1SRJw5TpKU3xzGucSzwFQYERMv4ax3bkONd1e5c=; b=CC4pAUh25Pd46eZVr 9U8087yU5THqRuz11kmFKICH2PhzJTBARuZ+jGrN+gwCEC+kJMhH42+TqGlO/xXz sSVpGrnFdxkAY376M8MfvqZqFWxoswJFAx4P9pY3PI3CmuiSQcmTuHyR4qqs8ud6 Eo1Jx0rLXtsrPxbvu1zleW9SdKpeyRaAzpkZMyq4SE++eaW/Cyd5jhChPv0OVJup xEsG5Xj3Ncy3xV0opzeIc9ckpZmul/GAXqhYr+u4z6rUwo6TRiCWwdYtn8LZL5GW 9BIGE8esIAxtbZrjW2YDaOHhQtYJK+1IIuHvPUOFdbxmY9XWbBsbDomUTCF39JKO fgxMw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFajVd7j7Z6Z42FQpFa30m8vV2rYT4ffeJplNw2ETD8eFgFQnsMzncpv2EAz+/LIx d5DPBF38qeJoPq9+MvTiVINiPradblZsRbEkpmFao6EyaeJll8HfJGlDBaqCI8GvhC9sbg dVEtHWYvIL9luA009lEuP4Gw70oO/jsqp5mV7+BlZHLt3XzZdEao6MRtSSSBpmb6uaNMDX sUmiZ3BvB7a621gWdEaVC/8J1OERXIu5daGbUa3hL+qToXS/EkjsPyn89QvZYDce2uh6om RasKXRdreppAf53wrBc+KcX5GKKgaNpL0G6DRfj2Wey3grVOwK4ESQtwDRQ0sE/4juXuV3 eiMoYjA3CWCzRKRhHbxR9OkvgBDGLQfDZYIENfSDfxYfZKRs9vGs1bH+t6O4SD6X5p52kA XOZpuettt+I7OfCrC/F6vr5AHLBs198+nKmIEQ4CXLmdy8pVZOw1p0vcbRy/QzFM4xiNGf VJhz9aB2kwZrV98jVNmxaUDD39/6eyU5VpbuFlvt+5yJGL5UGwSPyklmi+J0CsYTVh+Qa2 v4Shh/jMMvNQvkHHtlkKHHqx2YYsc5csRtp3OjJCd1IVIjXfJao9HxHja7UvfgiW8JPhzq uBFD2YjzWodT0Nmtd/MZqaUCn+cdQoAYp39km6pCr/mJuAK6JVBniLAQ0cAA X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 8 Sep 2026 03:50:04 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1788853802; bh=srK5Almu3JMotj6/ps3SwdwUDR7YWA69BMs5PZFyKow=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=XyhJxWeTBzX2/sRTQGuuQBK6+6EaQnZJLk48Ucx2Xi8eE7h+YQBqN8KfBlaMsxsT6 IXvi0PK6tz1/Im8L6f4yzlabaDjHZ557GFQOAmFw/C2JsnQuTBMNFYXLCTBhFY57j4 4ZIRfjvvHkeQKQWx7uVvwBpv+trCGpbzxn6hTm06BYUG7G4GL6B0/PHT0xMbYGydPq FkXJ5bzYqfDY1FgfxOz6XphMQ4/+mXSiWF2UcyfWZhNibS+7nQ00FPNAH8S/Udbup+ MLBXnVYuhgTgSIp151uSL7sVzY7CapfENV0MV8Pc+S0VWivo7zyHfpGAlUYeiMCrIe GoVTLiO8fyyow== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 77230B00186; Tue, 08 Sep 2026 08:50:02 +0100 (BST) Date: Tue, 8 Sep 2026 09:50:02 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: "Zhijie Hou (Fujitsu)" Cc: Amit Kapila , shveta malik , pgsql-hackers Subject: Re: Remove stale XXX comment in logical launcher Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="3lvjw6xwjq6anblz" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --3lvjw6xwjq6anblz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hello, On 2026-Sep-07, Zhijie Hou (Fujitsu) wrote: > Here is the updated patch with the suggested comments. Mumble. How about like this? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ --3lvjw6xwjq6anblz Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-Remove-stale-XXX-comment-in-logical-launcher.patch From 277a9d6fdb7e22ee58ab1557e4227a52e01bb45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Herrera?= Date: Tue, 8 Sep 2026 09:44:36 +0200 Subject: [PATCH] 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. Author: "Zhijie Hou (Fujitsu)" Reviewed-by: shveta malik Discussion: https://postgr.es/m/TY4PR01MB177186C8AB596F30DF704ECDC94B62@TY4PR01MB17718.jpnprd01.prod.outlook.com --- src/backend/replication/logical/launcher.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c index c328ad53ecc..5057a928adb 100644 --- a/src/backend/replication/logical/launcher.c +++ b/src/backend/replication/logical/launcher.c @@ -1284,12 +1284,12 @@ ApplyLauncherMain(Datum main_arg) retain_dead_tuples = true; /* - * Create a replication slot to retain information necessary - * for conflict detection such as dead tuples, commit - * timestamps, and origins. + * Create a (physical) replication slot to retain information + * necessary for conflict detection such as dead tuples, + * commit timestamps, and origins. * * The slot is created before starting the apply worker to - * prevent it from unnecessarily maintaining its + * prevent the worker from unnecessarily maintaining its * oldest_nonremovable_xid. * * The slot is created even for a disabled subscription to @@ -1418,7 +1418,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); @@ -1627,6 +1626,11 @@ reset_conflict_slot_xmin_to_safe_horizon(void) /* * Create and acquire the replication slot used to retain information for * conflict detection, if not yet. + * + * A physical slot is enough, as no logical decoding is going to be performed + * through it. In fact, the slot will only be used through its xmin horizon + * 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.47.3 --3lvjw6xwjq6anblz--