On Sat, Jul 11, 2026 at 8:42 PM Jeff Davis <[email protected]> wrote: > > On Thu, 2026-07-09 at 12:47 +0530, Amit Kapila wrote: > > That sounds like an appropriate solution or we can use (connect = > > false) option as well a way to indicate NOCONNECT. > > That doesn't have a separate state in the catalog, so DROP SUBSCRIPTION > doesn't know that it was specified. >
I was imagining doing something what CREATE SUBSCRIPTION doc describes for this option: "Specifies whether the CREATE SUBSCRIPTION command should connect to the publisher at all.". I mean some sort of WITH (connect = false) but on re-thinking, for DROP it is better to use a clause like NOCONNECT instead of providing options. Anyway, we can brainstorm on the exact syntax in a separate thread for this work. > > Yeah, we can do this but if we want to change this behaviour in the > > next version, isn't it better to tweak the doc wording as:"After > > that, > > DROP SUBSCRIPTION will not attempt to drop the subscription's own > > replication slot. It may still connect to the publisher to drop > > internally-created table synchronization slots if some table > > synchronization was left unfinished; if the publisher is unreachable, > > those slots (and the main slot, if it still exists) must be dropped > > manually.". > > Right, we can make the documentation match the code instead of making > the code match the documentation. I don't have a strong opinion which > way to go. But the wording above is fine with me. > Fair enough. So, I'll commit this to HEAD and backbaptch till PG14. > > I think in most cases where we need this is where the > > publisher is not available or the network is broken and in those > > cases, the current code still works and won't leave any tablesync > > slots. > > If it can't connnect, then the tablesync slots could still be left > behind, right? > Yes. I think I wanted to say in such situations "the DROP completes, but the tablesync slots are left on the publisher for manual cleanup.". Sorry for confusion. -- With Regards, Amit Kapila.
