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 1wgswb-006TVD-1V for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jul 2026 23:41:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wgswZ-003fZ4-0v for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jul 2026 23:41:43 +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 1wgswY-003fYt-2w for pgsql-hackers@lists.postgresql.org; Mon, 06 Jul 2026 23:41:43 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wgswU-000000028y1-1mN1 for pgsql-hackers@postgresql.org; Mon, 06 Jul 2026 23:41:40 +0000 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2cc84e77e78so15598425ad.2 for ; Mon, 06 Jul 2026 16:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20251104.gappssmtp.com; s=20251104; t=1783381296; x=1783986096; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=LG+ifYSM0cmXY0E1p+gC1WjsaiiwKcFxqMw/UhNHqxk=; b=ZIQ0zn6/ueQWpuLouncEr74noQ41U/O+HZb2GgOPx0fHhMuBVII1AjLWE5Gw7F/GgC 5z6QAQDEorFOnecw+iUaaLjCAoSwNO6n6SrUWTYXkEnPy7We7oo9QKnn64mUMgTJEnmb UYCUO6Wgl8jlWURoDPf+WiiRdxDxnre7iJCh0OdLreviY3YV0t6zJS06noStwe/lJEFf d65/js6gk8TjvXA4XSAJecZAAt2Tl9LDjBLXpTtWGP1Xiwhb09p8b3GFWt6t5XYAopUW iG5MZqRgoVPE1uXtNXnTZ/89+TTywDWEcHK02jRM9bLjXimV3iOaDo5OvOQuKWvUcJlQ /EYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783381296; x=1783986096; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LG+ifYSM0cmXY0E1p+gC1WjsaiiwKcFxqMw/UhNHqxk=; b=RVlEmTSAxv1onPpVwlHkY8jXVSxo04WKkEm2uPpes2/FJYhNqW46W6OxPvT8VFaOqv x/VbINkdQSHaF73WwNkKbLNPsweizPbimnmYo7siFA/qZcFR2kOHL17BLWUUQyUXmseA dfvLryqkLyDEMuEID5ibpVqB56gnv77iHaKRxuGPtYbGzuAK3j+Uj1hdNZve1/NBZJLl 3htjBk5VzheUczhOxJK4GQzKe33uxrme715Ieg28oVpYiysR7KsvkXfKMO5pfAIundYh LkhwVrLV9yDUY7us+F+2lJgwXChqjy+R0R4B17p5/pokDgFp0nfiL3tEzX4WmVI1YcYD KNTQ== X-Forwarded-Encrypted: i=1; AHgh+RqxH/naqk3AXd0Ucq+x4ZqXhPZTwCWiEHd1zF6pj6Ns0HA82f+safXiAtNP34V3eCX6zzZUnLxoinBVfzOs@postgresql.org X-Gm-Message-State: AOJu0Yz+5XLc7efvTYqcTXkQILVmIc8HEChcrFJ95NRJ5mEc1khGbmLk JEySZoGx3CJx2AjAmhJsdZVO7xOhIHyYWHam0/4OPT2m1vD1sjyXfutDOtUJUSSFTg== X-Gm-Gg: AfdE7cmaw8UeOawyS8O0cjQDmOlkX19Fggx8MkkF1/yOhiiiuAiwzOaROb+/2+5wCCf 9X7bQWoLwRaDYwlMMUEuKOEjypuDUtZU34WKIGnWo3pMuq7sf/65I8zAUHRcbHpCmgivm6Wdf1t /vRdue5IQcXWbYzWumJZhSs27uQDd4SpAkQo/MeIWk7fzz1IEZBegNe+BjL+HJhc6RWbigu5pQ9 AJRqcBZRaOBhrL5P+A+aZBeT0Z3JVXyqJRJFMn9gMscBXKehzemiPx9oGiwslnaGHfOJYk+LoC5 6fS6Gn5lEFbEZUZT16Pqe1PbQwC+KGyeGnH2Sim3Iv7P/CGQ94BVBXN0J/GhDmCa4qA9TzRFHiM WpJ8X3YKRamfMYTddihhFibkl5+ug7Hkj925h3DQvZGEokyoFSADEjOHgml3Cz6G1IXTSbZWAEg LW7OvC2tFHQH3dJtmaUyHMrgIKGtAe7oOBuLWPcjlMjg5mfw== X-Received: by 2002:a05:6a20:1602:b0:3bd:229c:dcab with SMTP id adf61e73a8af0-3c08edd73cbmr3584500637.17.1783381295963; Mon, 06 Jul 2026 16:41:35 -0700 (PDT) Received: from jeff-ws-bridge.lan (c-24-7-19-3.hsd1.ca.comcast.net. [24.7.19.3]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-31174839f89sm1399063eec.10.2026.07.06.16.41.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2026 16:41:35 -0700 (PDT) Message-ID: <131c80088565c68e64c02572a800316c6bbb379f.camel@j-davis.com> Subject: Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server From: Jeff Davis To: Amit Kapila , "Hayato Kuroda (Fujitsu)" Cc: Chao Li , Zsolt Parragi , Ajin Cherian , PostgreSQL-development Date: Mon, 06 Jul 2026 16:41:34 -0700 In-Reply-To: References: <960DD2C4-A22C-463A-90ED-86E0FABD8D20@gmail.com> <8B38AFCA-7FFA-44CF-B9A8-81BDCEAFB224@gmail.com> <705148C3-519C-45E7-9EA8-48D9F3B79B06@gmail.com> <1B3A7FF0-3292-484F-992C-27D172772EB8@gmail.com> <65166eb6feb87356f8d60bfe646289ce15a6c729.camel@j-davis.com> <24C6472D-DCAB-4F69-AE8A-FFB4AAB3F6F0@gmail.com> <5c629d2455946ad2fde3c184f64ea2c323ef2133.camel@j-davis.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.3-0ubuntu1.1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2026-06-29 at 10:07 +0530, Amit Kapila wrote: > On Wed, Jun 24, 2026 at 7:48=E2=80=AFAM Hayato Kuroda (Fujitsu) > wrote: > >=20 > > I went through the 0003 patch. Apart from HINT message, I found > > that error code > > ERRCODE_CONNECTION_FAILURE is always used. Should we report the > > original errcode > > of the root cause? > >=20 >=20 > That could be marginally better but not sure if it is worth the > complexity. I have a few more points regarding 0003: > * Regarding the point: "we can't absorb every kind of error." In the > PG_CATCH, re-throw query-cancel / interrupt-class conditions (if > those > are possible) instead of swallowing them, otherwise a SIGINT during > ForeignServerConnectionString() becomes a silent successful DROP (for > slot_name=3DNONE) or a mislabeled connection error. The DROP SUBSCRIPTION documentation says that: "To proceed in this situation, first disable the subscription by executing ALTER SUBSCRIPTION ... DISABLE, and then disassociate it from the replication slot by executing ALTER SUBSCRIPTION ... SET (slot_name =3D NONE). After that, DROP SUBSCRIPTION will no longer attempt any actions on a remote host." But that stopped being true after commit ce0fdbfe97. There should be some kind of escape such that we can force a DROP SUBSCRIPTION to succeed without trying to connect to the remote host. And if we have that escape, then we don't need to overcomplicate this by using a subtransaction and trying to guess which errors are recoverable or not. Regards, Jeff Davis