Hello Masahiko,

On Fri, Dec 4, 2026 at 1:40 PM Masahiko Sawada <[email protected]>
wrote:

>
> Right, such a subscription works. But I think the problem is that if
> we dump and restore it, the subscription is restored without any error
> but loses its slot name. Also, pg_upgrade fails if the subscription is
> enabled, since we cannot enable a subscription without a slot name. So
> I think it would be better to fix it.
>
> I think rejecting "none" as the default slot name is fine. Users can
> still create a subscription named 'none' by specifying a different
> slot_name. What do you think?
>

Agreed on both. Silently losing the slot on restore is worse than
asking for an explicit slot_name. v4 rejects "none" as the default
slot name again, and there's no pg_upgrade check.

I'm not sure how best to handle Chao's case, though. v4 says:

  ERROR:  replication slot name "none" cannot be used

but slot_name = 'none' is still accepted, just meaning no slot. So the
message reads a bit odd next to that. Would wording it in terms of the
subscription name be clearer, something like "subscription name "none"
cannot be used as the default replication slot name"? Or is there a
better way to handle it?

Thanks,
Baji Shaik

Attachment: v4-0001-Validate-the-default-slot-name-in-CREATE-SUBSCRIP.patch
Description: Binary data

Reply via email to