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 1wFktV-005Vjq-1v for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 03:38:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFktU-00GhpE-1a for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 03:38:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFktU-00Ghp6-0e for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 03:38:24 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFktR-00000002LtI-3iBM for pgsql-hackers@postgresql.org; Thu, 23 Apr 2026 03:38:23 +0000 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-2b23fcf90b2so59377415ad.3 for ; Wed, 22 Apr 2026 20:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776915501; x=1777520301; darn=postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=B7eA5V/8hhGFznw6hftvIoGwJnqN3bOjBiv9i+4Pw6c=; b=K4ZZ20ZKuStwLktzPoxSA/S6hzyavSppcaKQ0FrSZ6SzhDYkWaCQfnDxp7V0TCOMat MttYVcq2Me9qtczKUlbPMp0bQam/HDnYvgVk48rKIehla2KYuT222QrWwp06e5frQPgD 0x8azbGNJYrU+pk7BocDManEXfM6nNwFp8LD+5E5YSEfJWKbbEefddE51P84s0rwXuzj o4euSADdc6UnRXqEYX5GfeY3BgnuQV9O5t4sFr/keYdY2xUDYgJbTZE1ZhrwxcynGrzr bXD32pkB1CAWiJpbUnnU72lXhJ3gfcjuKVazlOekbwoEfZY6vbg+gHxF43R8H37ksuz3 S98Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776915501; x=1777520301; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=B7eA5V/8hhGFznw6hftvIoGwJnqN3bOjBiv9i+4Pw6c=; b=gFu7WYYR9mXDWQJqUuy21PhBK7QmpnsA7Bk0z9GXugbfKPYNj63fhw3gFDHGhnAiS0 D6paL7g4lekVjk3WXVjAwrI4q+Rly1o9ky9VcgLYSeBlXMiaAMvcUlbz6n6APY3OU7FH w1K6yRQ4i6AM19Duj7UrzaSnVconLAfnSB/paFuI5R3gTnvGggVeeZUMezMGj0TSGLPr +SJAe8F7Rgk6f300F8mXS66+93O0PyjBMEMRoulp0K5huYAY599m4pe7t4n9xcrTHFNM yXATC78oBF2/7/3WY71/LwwFyOV5Z5IloydVRoAyhHnQskUHBgVnCpGvxnG2KCS++Lgp bhTw== X-Gm-Message-State: AOJu0Yy2HRxR59SI8i9WjkvlTwA9uwft9WCHVoiwZZOhacm1URlyexgS ZLq9qaln672e/1CZxBLqFQOz34CtPNxvpbY3mWOyU3bL71ItOHY5chTvO0wllsFu X-Gm-Gg: AeBDievMulqpbCcFdNlLvBwD42nxBnD0HFzhYiqBaahCIRXOTz4yFZLZx5ZjBj6i8A7 +RZU009brh96ygKwOhAN4IT4BPg7B8F3ijP2nFulDYxDuSY1KDZt4P9aMRTVj2nqGCaqPUdBnld FObZ8NQ0b1OzmXR6HiPsWoY0hD4Ryw/AxhZORDCijdP5POtmCvfJhOA4LCovAQ495Hf4NAolzVQ P6DzqZAVLLRWqQd9Sj5GessMcbxfX3+IM5G4GaUGdypgzR5YLpMu3LJH8vaov4Tv1fcpEkAY9EW VVUGfyZHFjuVU0bVDslxf7/M7qLuSO5Y1jgz32LouC1pSC9lf996/SKAZCkYcX7ldhUOE+L44E/ k4lozGbm9AUQAPI9jC3kI5LfuTq5bBmqXgYt3KVnrt5H1Yui3m1rzF1pYvrTnzqFEcj9rN5aveh 07PW4jL2GW0TONMH+8fmh2OxEn9ZaKwEP0xTd0FlXAIafcwbrLwdvq X-Received: by 2002:a17:902:e195:b0:2b0:67a7:5c4b with SMTP id d9443c01a7336-2b5f9f402b2mr157540135ad.28.1776915501238; Wed, 22 Apr 2026 20:38:21 -0700 (PDT) Received: from smtpclient.apple ([45.32.121.103]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5faa3073asm170629765ad.27.2026.04.22.20.38.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Apr 2026 20:38:20 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server From: Chao Li In-Reply-To: Date: Thu, 23 Apr 2026 11:37:42 +0800 Cc: PostgreSQL-development Content-Transfer-Encoding: quoted-printable Message-Id: References: To: "Hayato Kuroda (Fujitsu)" X-Mailer: Apple Mail (2.3864.400.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Apr 22, 2026, at 20:35, Hayato Kuroda (Fujitsu) = wrote: >=20 > Dear Chao, >=20 >> I tested the v19 new feature CREATE SUBSCRIPTION ... SERVER = yesterday, and >> found an issue: once the old server becomes broken, the subscription = cannot be >> recovered by switching it to a good server. >=20 > Thanks for testing. I could reproduce the same issue. In addition to = yours, I found > DROP SUBSCRIPTION cannot be done anymore. To switch the connection or = drop it, > I had to create the same user mapping must be created again. >=20 > ``` > postgres=3D# DROP SUBSCRIPTION sub_bug ; > ERROR: user mapping not found for user "postgres", server "old_srv" > postgres=3D# CREATE USER MAPPING FOR CURRENT_USER SERVER old_srv > OPTIONS (user 'dummy', password 'dummy'); > CREATE USER MAPPING > postgres=3D# DROP SUBSCRIPTION sub_bug ; > DROP SUBSCRIPTION > ``` >=20 > Before deep dive to your fix, I'm unclear why dropping the active USER = MAPPING is > allowed. Personally, it should be avoided anyway. Do you know why it's = not restricted? >=20 > Best regards, > Hayato Kuroda > FUJITSU LIMITED >=20 Hi Hayato-san, There is an existing test case in subscription.sql: ``` -- fail, must connect but lacks USAGE on server, as well as user mapping DROP SUBSCRIPTION regress_testsub6; ``` So, I guess that=E2=80=99s an intentional behavior. You have to fix the = broken server or switch to a good one before dropping the subscription. = That=E2=80=99s my understanding from the test cases. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/