RE: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Chao Li' <li.evan.chao@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2026-04-22T12:35:02Z
Lists: pgsql-hackers
Dear Chao, > 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. 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. ``` postgres=# DROP SUBSCRIPTION sub_bug ; ERROR: user mapping not found for user "postgres", server "old_srv" postgres=# CREATE USER MAPPING FOR CURRENT_USER SERVER old_srv OPTIONS (user 'dummy', password 'dummy'); CREATE USER MAPPING postgres=# DROP SUBSCRIPTION sub_bug ; DROP SUBSCRIPTION ``` 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? Best regards, Hayato Kuroda FUJITSU LIMITED
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Avoid errors during DROP SUBSCRIPTION when slot_name is NONE.
- 702e9dfd6c50 19 (unreleased) landed
-
Avoid errors during ALTER SUBSCRIPTION.
- e5c40584a712 19 (unreleased) landed
-
Check retain_dead_tuples for ALTER SUBSCRIPTION ... SERVER.
- 8eba2edb8010 19 (unreleased) landed
-
Allow multiple xacts during table sync in logical replication.
- ce0fdbfe9722 14.0 cited