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.98.2) (envelope-from ) id 1xMNZz-00000001zoI-3ER5 for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Oct 2026 10:41:56 +0000 Received: from localhost ([127.0.0.1]:42550 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xMNZy-00000003t39-45vH for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Oct 2026 10:41:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]:55802) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xMNZy-00000003t31-2p1C for pgsql-hackers@lists.postgresql.org; Thu, 29 Oct 2026 10:41:54 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xMNZw-00000001ZZD-0ssF for pgsql-hackers@lists.postgresql.org; Thu, 29 Oct 2026 10:41:54 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4a140e7405dso20401345e9.3 for ; Thu, 29 Oct 2026 03:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793270511; x=1793875311; darn=lists.postgresql.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=iSeKNNPU59EkG/G+zN/JsbsW4A9bazPR4KTDONE7jeU=; b=EQYEFTyAwvxBdhRYld8N20LkT46fs1Lw9IdEffHAUFIvXwgWQy1TNEv3m58wO3xexH leX916vkf9k3sCN6ecVF3EKaVoiALnmWZiNrLaY3YgSCzPKV4xdGeDDFc76OfpEh4fNe K181uNSNmLhm71EY7Z+A/uC6wnFjk4EbE+g1kfacP6Jlinqc8hY12ydiUMpRxpzEmxOC 8qxmoUEzjJH/+V829zBmWuRhTMlxPVIkwMxiFwYnyoPMyA9bP8yV/U1V1EbXEys+b/vl V6XR9aBvQvoTryDxUVTZnVFxism7DpQLbL2vOfHfeyWrY2hA9u/BHfhuYA8hfjILXeif ZXAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793270511; x=1793875311; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=iSeKNNPU59EkG/G+zN/JsbsW4A9bazPR4KTDONE7jeU=; b=Bs6BWMVaHINCovaOShCAt4K0GqIolAhLLLmdjF9joyNeq05VmB3/mWqmw5W8/Cljh2 B7owxgRGQBThvH1zKmfKgbNAKQChC0pxJWicWcVaEkCn7JjodCdZkYqkQy0K3qkU5sXZ qVxzdJ+N00wywaJPYaEXS6QCKZNk8QIhP4dq+o5hhYFfWnh/D81xSBk3BMitcuDEwZzL CBQv4NjFvZ/g9vfIv+H5h8Q4PCn3PNocPC3RsL50XrhHer0TDltfJh/BKUk+Zk8LWPZQ iida3eUa8mUi37j36WNuKy8jGqQXUPcOmYaqN7pLXyeNzsRcmob4OHoJMbXLVA2YQ55U l32w== X-Forwarded-Encrypted: i=1; AKwUvBywGEf3ILb/etCnxzlx2iOKqk/G2flgbOojjib4wVwhnLHs5JBgvLsuel/iTLwVultPwIAzgZM18OEgid3k@lists.postgresql.org X-Gm-Message-State: AFq9FYKz0xaLBfGfAI4qfm30k1Q83IUHikhXX/O66X0hBKrhLDKKAVR/ Ir0IG5juGzZZDWizEAZudCMp8O5zwuNjMQ9h1+IufKv4VHaiYJuZfxGO X-Gm-Gg: AYBFou2NT2k1JoX0QYdaLhLkBakX75+o+0PHaZgRTXzbh2+C6oBq4hMye6y3+f1D2af FBIhC7ePo6IsB5LV9pZA5uEOoZ2u9CMYt+y/hPaMo3Rk8iuCjm2IHEDYxM0MWZgZXoczRvKiJeW TiN1xxsRdRVMTdbEC4GLTdo1ll9w0n8mW+tk9YmDgfo/G/w4Jzng83DkxcDR3WX7IKbNX1jL1ko pNWBOG5S44r5TimUUx6dFoKs9088lOwbjXUTQ8iWrHaG8b3upUfS74qsyflmnAek3oK5FZuEbNz huqYB8QJyujT+lgs4Y64vPh+fxmvu5RRaN5IP4Z8LCM8NNgfHiN+88GFe9tF4KTEiohDgSk8T20 tVn6j/MoXn+3voutKud5F557lQ0n5PZbOPQ0Y4eyVgmqfCx9P2oaLbcyS17n0TJU5zqB+BuQw3Q CVX19igs9tXInOmofq7Oj4O3w0xemxVyUVCn7SItZgqIqAaQUmlFh0UehdoJOvpZT8Nn4a3Lcgr oSC+GkDzmZ8OEwY9zJGfh1OUzqHlx9vkJBV7w315Fmhagv0Ts1RNME4ByWC5ZN5IYQARuQ7K9fv IQv65CiShLIDAqFkTI6r0ZbiWPe3OZD/wjKMPeZ8u+3RMA9xXfgK4FmqkbRLgBkt8pasDSIxpVe ubDzkEvkSYPvr X-Received: by 2002:a05:600c:1387:b0:4a3:5aea:21e5 with SMTP id 5b1f17b1804b1-4a96667bb17mr110989155e9.9.1793270510570; Thu, 29 Oct 2026 03:41:50 -0700 (PDT) Received: from bdtpg (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4aa7fdb7691sm55036515e9.11.2026.10.29.03.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2026 03:41:50 -0700 (PDT) Date: Thu, 29 Oct 2026 10:41:49 +0000 From: Bertrand Drouvot To: vignesh C Cc: Zhijie Hou , shveta malik , pgsql-hackers@lists.postgresql.org, amit.kapila16@gmail.com, shveta malik Subject: Re: Avoid resetting subscription two_phase state to pending when already enabled Message-ID: References: <8e85abdf-738b-4578-ac42-4dc8eaa061dd@gmail.com> <3ba34b9c-455e-487c-9815-8a7f31297065@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Thu, Oct 29, 2026 at 03:52:46PM +0530, vignesh C wrote: > There is the following documentation mentioning that slots must be > created with the same parameters of the subscription at [1]. > When altering the slot_name, the failover and two_phase property > values of the named slot may differ from the counterpart failover and > two_phase parameters specified in the subscription. When creating the > slot, ensure the slot properties failover and two_phase match their > counterpart parameters of the subscription. Otherwise, the slot on the > publisher may behave differently from what these subscription options > say: for example, the slot on the publisher could either be synced to > the standbys even when the subscription's failover option is disabled > or could be disabled for sync even when the subscription's failover > option is enabled. > > I'm not sure if this should be handled here as it is documented already. I agree about the documentation, but the patch introduces a regression: without the patch, two_phase is enabled on the replacement slot. With the patch, it remains disabled. It might be worth fixing, as preserving 'e' only when slot_name is unchanged should be simple enough. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com