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 1we3bP-004Wpz-2E for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jun 2026 04:28:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1we3bO-000rZl-1b for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jun 2026 04:28:10 +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 1we3bO-000rXc-0Y for pgsql-hackers@lists.postgresql.org; Mon, 29 Jun 2026 04:28:10 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1we3bL-00000000jQC-3xIb for pgsql-hackers@postgresql.org; Mon, 29 Jun 2026 04:28:09 +0000 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-c85a2c012e5so730052a12.1 for ; Sun, 28 Jun 2026 21:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782707286; cv=none; d=google.com; s=arc-20260327; b=aZMHsUzPslA2pw+e9Rv81HWg+1nWsX03bWaAtWjE9hjntM+ImH6ovLuAbp3oRvSU44 xKrkgDEktESlBdwFgXcrQ0euAicNW55BVLJ3ajoIvKTlcSWRo8AR9FWUre7Daa71U+u2 wgJbOBNxgn4V1xKA9cM4CXUo1GN4Ahgr0UnsbBHkVYm6sNwIWpgKrgvRDR1IKfueNE2f Py4IHfDm8Ue4eLUAQuRJ0Y8WvImKdJiCcZ/ry7xmHMxLQ1YNv9un5R2z3r9SyRXPBh/N 8LxQ8lNPzREDdfwpFwQHpqmaEnmf3152LUfI2bPEK7+eBEatjW5J5qivWD6nPH7H80LT 8C9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ANY8RW4mAcl7N+G6oAMQOVnKjSnKBg1Kt6ZCq3idwyE=; fh=wxiuiwXRllA9VoW50DL5XQXwUBAVzcCFTRt/CRym3BQ=; b=Pv8Lwlq1tRrVX4Q1ej4WbhvisX76TyyG+k9lcRsQGuFuug8kbwrDoYMbyaZbZiCXQT WTNOtpYK0XDNE9SquLbLn8/3P4GsIYeo8/WL0JsT74plGyO4Heqh9G6r3bIjJLcHKcnV qL+PRzEL976XsDDT3301tb9HFInThMLaE8NgtXzEwvvXEDMEpjKd2dv2YGbWV4nrTYZ7 TJ4vTBEpVRs8WQre6my1JRbyfs8bmNEl+OmYEsyqin+tAvpN2g+DEACdPHxBRHoLaFov /RWaoPnbgWwDURYlHbn8HedUxFVR5/TAlitAtTO+S+q1iZxkjx9qRBdx5PWjyCYO0aet 7CEw==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782707286; x=1783312086; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ANY8RW4mAcl7N+G6oAMQOVnKjSnKBg1Kt6ZCq3idwyE=; b=iUSyy01pKUlRyDCnLlcU+L99/ltRoXDJ+Z1YaMAJtkNclkCULCLWzv70fbhq5Nzrzk ju9UfeYi2+uEpoBUQgvAvGLb2raY0ld545MuN2RWveateXl8UfIlBQpzvgNYaPUeCq2H FvWdVhlQopPNhrl3bMExx8jDntXHA5HZUihTLDYaOzfruA8maoj1nJCOIJzMA1NH3N6V V333XCpRCvGQb6l5bHwadO2BpXUXR8ukOrWTXpZG2T8Gzbli5UiCShPBaBKl/Y7piCwA grlJbzPP5Jz0nFspVkz+etOUnDXS9lkAAC0QFLsmO4i+nF0iw2L2R0VvLURgYmdmaUFL 9AXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782707286; x=1783312086; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ANY8RW4mAcl7N+G6oAMQOVnKjSnKBg1Kt6ZCq3idwyE=; b=FxUyajlKTEaHsNLCju+nqLuqC6HdauYmxzjMwS/0QeSJZXXb8YG0P6RPNlLS8YELOy 1EYerD5DKmdMAfBpM6eGehcfSRk2vipyKqNi+zU93uUWXQYWGhQeNEQVNfcr5w2gXNtW E0kSgjnKmBfMJflmDbz6ypcd5IMnWQHDDMHg4F4PLLCUnDCilAg+sol7KFE7MIKVrgnh nnBVkSApqLBuaLV1nE9ZrqRhw95bORp2OoqQSgBzOnd72/Mz6hoAmaFK4nTh7p8Om+cq ix7ajM1DIERzokqusbqdx8xbZ2ZidnRDbJHm5KniN/A3OyQdujSodrvAr4KxQfcy4oCn kUaA== X-Forwarded-Encrypted: i=1; AFNElJ+cWRRl29+jN24X7gkGN6aKhIGj9hqphG0sKA2nILKRDRxDDzbLxbrI8q1LPopigy6iAStPKyEq8VK7Awml@postgresql.org X-Gm-Message-State: AOJu0YxFrqX3YMFGhqB/NfK2ByPs/h6sfrHM93pXTMbMfermjuQNw6jw ISnmLBvcfCWTH7wXCFMfDl6te1Wd9NMmCKcTweRWSG+HOZUDvuT7waZbrM8ZUSviQU1LqnTWV1A oK0Vw7VDC/do6U1FL6G6h3sJ59iPjie4= X-Gm-Gg: AfdE7cnbcu7JWxn/U8zojpyoY/ZfPJMdxopRQnU/de/qf3bnriG1QCcnxbiSfjtgix6 1AvA9CAIiDaGGXHUKp0ZfBGCBypNfIjEiLXvE/NXzFhPxzKAcrAmDmgCu/9onS2POg3qV9OgIqw 0Z0YrvJLyAr3VRzKuE+LemmBBPIfiLNieI7DjuOuHZoFmBrUPvoHIFkPEHSIKXSg9dDrjrPIov2 og4xTyLd7myC1BEvbdQPl54TS8GCjvRACEUsVbT+IjXmNiSIiiEDLJNQ0kceh/T5KxYekOvNUGV ZAcplEgSfMsgfUB+lcF633OLZmESoR8dqV9kKhShAVAY8CGy8BpFO/XUBuAKcyEUQuJfBcReGks = X-Received: by 2002:a05:6a21:490d:b0:3bf:a36c:5496 with SMTP id adf61e73a8af0-3bfa36c7bb6mr1313125637.55.1782707285731; Sun, 28 Jun 2026 21:28:05 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Amit Kapila Date: Mon, 29 Jun 2026 09:57:54 +0530 X-Gm-Features: AVVi8CcikScQ1eveC4qYZG6C4k-UpNvpF5ILl6MYrjbw_qwPShddcTWRZByb6U0 Message-ID: Subject: Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server To: Jeff Davis Cc: Chao Li , Zsolt Parragi , "Hayato Kuroda (Fujitsu)" , Ajin Cherian , PostgreSQL-development Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jun 23, 2026 at 2:40=E2=80=AFAM Jeff Davis wrot= e: > > On Fri, 2026-06-19 at 11:40 -0700, Jeff Davis wrote: > > * add an escape hatch for users to turn off tablesync slots so that > > DROP will always succeed > > It looks like SLOT_NAME=3DNONE is already supposed to be this escape > hatch, even for tablesync slots. From the docs: > > "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." > > https://www.postgresql.org/docs/devel/sql-dropsubscription.html > > But DropSubscription() only does the early-return if there are no > tablesync slots. If there are tablesync slots, it still tries to > contact the publisher, even if SLOT_NAME=3DNONE. > AFAICS, the corresponding DropSubscription() code is as follows: if (!slotname && rstates =3D=3D NIL) { table_close(rel, NoLock); return; } .... if (OidIsValid(subserver)) conninfo =3D construct_subserver_conninfo(subserver, subowner, &err); else conninfo =3D subconninfo; if (conninfo) wrconn =3D walrcv_connect(conninfo, true, true, must_use_password, subname, &err); if (wrconn =3D=3D NULL) { if (!slotname) { /* be tidy */ list_free(rstates); table_close(rel, NoLock); return; } else { ReportSlotConnectionError(rstates, subid, slotname, err); } } So, if the connection is not successful then we simply return without checking tablesync slots (when slotname is NONE) whereas with FDW server connection, the ERROR will be raised from construct_subserver_conninfo->ForeignServerConnectionString(). Isn't that different from current situation? > > * consider it an unimportant edge case and leave it the way it is > > (with 0001 & 0002 already done), and close the open item > > I plan to close this open item, and treat the above as a pre-existing > bug, which may require a backport. > As per my understanding it is better to go with your fix idea even though we don't have better ideas for HINT message. I see your point of making HINT much longer as we may need to add something like (... or re-create the user mapping/ACL and retry..), so we can keep the current one as it is and if we see any real user complaint then we can consider improving it in the future. --=20 With Regards, Amit Kapila.