Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server
Date: 2026-06-22 21:10:25
Message-ID: d87ac2f15c496f78bc6288494d18e39728566c76.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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=NONE 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
= 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=NONE.

>   * 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.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Baji Shaik 2026-06-22 21:21:17 [PATCH] Warn when io_min_workers exceeds io_max_workers
Previous Message Peter Smith 2026-06-22 21:03:27 Re: Support EXCEPT for ALL SEQUENCES publications