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 1we3kH-004WwJ-1s for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jun 2026 04:37:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1we3kF-000voP-1b for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jun 2026 04:37:19 +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 1we3kF-000voG-0f for pgsql-hackers@lists.postgresql.org; Mon, 29 Jun 2026 04:37:19 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1we3kC-00000000jUX-1Fgx for pgsql-hackers@postgresql.org; Mon, 29 Jun 2026 04:37:18 +0000 Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-37fa06b39b4so1419341a91.2 for ; Sun, 28 Jun 2026 21:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782707834; cv=none; d=google.com; s=arc-20260327; b=kp5BdM4npAxBzHnltTSNZDWC9G32/UFmrHW1P2WzeebuPx1R1x8C1Q1gNyGXk1EjoH 0EPYUwrWuR9NWTiuNEkiso3qhdrUd6XakL8W8ZP4o7lpIGayUq3gGlModDWEa/3l/iIi aWS+JPZPgWq2Xvi83RiQv/LwDOJqHvnQYPtWrSV49rO/pisdhdLmfrVgX2ysqhoywkAd O0aNcMBSkV6zlqJkfmzpPqu/9KbKUllmQMqfJDxiaFaOM8Lgq6PUBU0Ny/EQSz1h1dKX C0s+QXIDmfwXMn/Bw9JhsbYCuFk9MaZXlnS/OEFNwB1bkOtqdiWfJTn1RAn+xKaHVJ+9 DkKw== 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=YxLy+tvgiPOcv/l/AQt/coUNoB6afwRTWy/O9Mc+tj4=; fh=LcOgAYIzC4K/0uL/WHU2lQOx5FI4AzeqVwSNOw4albg=; b=PYDpbzk/w5YJIRSkOGdDDSzgrAGuFjMGuXxbUl6xFfk+MQTpY/ciiS0N9fUxUbDnjZ kFdl7AO4omgE/rk1OVbnk9wstnvQRAa8E86G8BF5lK8sXetqWb2Se/KMe73/Op/NUjM0 m+Q5u7kvOCz2e8UgB0SL86CMtsLqhNhOo8lEASR2LKqIYxfVn73PvEWKW8lT1T6lDp3y Wxfy+qIy9S27BMhMhSShLDWYolrzMiVhLr56STlTBVKb/w2i84cxGSZFUXf4tVbUgxpC W+MZlHAZ1CJkGSh0lizSpVDnfXELRwsDPU8/Dmf58OHHDitM3fjsJIWHhTgvVsdfe31q Ch4g==; 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=1782707834; x=1783312634; 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=YxLy+tvgiPOcv/l/AQt/coUNoB6afwRTWy/O9Mc+tj4=; b=lX6Jy1IcO4Qaei18J42fsFDYpDtk99TDWNPOKtWlu5yGGUoJktnS6JBKmYWUXJotjb 48yKuTsDUNnN6J5EqxaCgjecAZedW4tSa3Svji0VLDPRJMk71QeJuDgLJnSqRz4xW8h2 X1sAbOpzEdpTp7MwRm2BJuu2gQUVWkuk8CYTsFCcgTDQ8sA0s7OIbmbNbVisXGoweEit 3+B+tKqBLgORsEeqzpQi842tPyQEEwfdznrJtZ9G4SQYg5zRSSFwPqPjd4u55BB2ou3F gnaocePui7wj+BiU5uHCNV2E4USKmaHYViGTEdWWja9id4GXGKqGZDArqdUtnpnUpJmB ZHPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782707834; x=1783312634; 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=YxLy+tvgiPOcv/l/AQt/coUNoB6afwRTWy/O9Mc+tj4=; b=dOpMOK6jjc9p9TzCUZhq5GTVVWZtccMyTkyhb7HZEZx5/3jnySZMQ7oVxzyTJP1y8f fYxK/94hVZHuieAoBYA5eYF/NrOMJUZe3BRWAm0DchgEofxPF1QXDMhkdKhoBXQK+Q18 /OsPskEmyQVURCgStht/SPp56+iLkryi6Mz59nfChylFdFmNV7bSH157rzQ5oFCIaSlw /TZz0n7NR8PIrzTBJraWN8AMJnWirjZoR8mgrWuSTyHxjNl1LynICC4bNh4mCYVGbTgh go91E3mHXUpQ10gZk04B+P05gy/u2AD/Kw5B/XFJ7kzce8gpjVOD32i6SU4jLHJ0Wjsn Zp/Q== X-Forwarded-Encrypted: i=1; AHgh+Rrkwjx+rxfHDKBOMv9XtSqCz1a2JviqRALFH5xrFf1szyjQHz2ozLR1CJ9Ph1cQgk7IqvFHWiruidOkVJIH@postgresql.org X-Gm-Message-State: AOJu0Yy4xegziV6GIsnSifoke0Esc20B4rFGBAYrBO+LilffOPh4CShS xqcipkwI0cts2cJh1t64StwqZRZByiO8bGFRRVa97ddLuzALZmed9MVOgaHxXjD4XXpTg5iyQZy jhSuvG1jmY0ROEzqNNQ5ztz40BGMwT6g= X-Gm-Gg: AfdE7cnGawYBIosR76IvP+Bhc1oEiqIZPQYtQ73x6QF+amMh1sezRGxJOkIVYC40Ld5 PmKXLqw8PU4RImguWJP4bkIQVDHvKvzi/jhH5GpQwha+W7vvpt73GjiFZokdafDrDYmeClwK11a OT11jSYdJ/qBH9oRh+Ah9enWeZIkvVIWU0d4PzlXvXYHJOhdx1yBj4PDbQ+wDIO31/aL8LMHDYC 3S4h3J5EI+vn/IVr73CH1Ev/faWLno5/B0UyFxQc44JuJZhAKnr/4InCOfUVDBFLwAOkIFD6eLm 5smdFbkgwWp2CUe9TiexPh4jlyhABzQcK7yuG445HpZKb54ovZQDaZr30EMhM/72zhYpYFeHvJM = X-Received: by 2002:a17:90b:344a:b0:37f:9ce1:cdb1 with SMTP id 98e67ed59e1d1-37f9ce222bemr5238330a91.31.1782707834081; Sun, 28 Jun 2026 21:37:14 -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 10:07:00 +0530 X-Gm-Features: AVVi8CcT8HygsK-nOjEpBwWbVKCtzTo6gc2-eu2kPtsOMEbfR-NcWUm9k5bvaJg Message-ID: Subject: Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server To: "Hayato Kuroda (Fujitsu)" Cc: Jeff Davis , Chao Li , Zsolt Parragi , 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 Wed, Jun 24, 2026 at 7:48=E2=80=AFAM Hayato Kuroda (Fujitsu) wrote: > > I went through the 0003 patch. Apart from HINT message, I found that erro= r code > ERRCODE_CONNECTION_FAILURE is always used. Should we report the original = errcode > of the root cause? > 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. * + if (aclresult !=3D ACLCHECK_OK) + ereport(ERROR, + errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), + errmsg("subscription owner \"%s\" does not have permission on foreign server \"%s\"", + GetUserNameFromId(subowner, false), + server->servername)); I am not sure if this is a good idea as the outer catch will anyway silence this. --=20 With Regards, Amit Kapila.