| From: | Baji Shaik <baji(dot)pgdev(at)gmail(dot)com> |
|---|---|
| To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Cc: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: pg_dump writes a subscription's default slot name, which can't be restored |
| Date: | 2026-12-04 21:41:41 |
| Message-ID: | CA+fm-ROEgwFCktFE_+FbvKQy6bXMXiyJV_rCPXmYo7dOD_N=rw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello Masahiko,
On Fri, Dec 4, 2026 at 1:40 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
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 | Content-Type | Size |
|---|---|---|
| v4-0001-Validate-the-default-slot-name-in-CREATE-SUBSCRIP.patch | application/octet-stream | 7.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Dmitry Fomin | 2026-12-04 20:57:04 | Synced failover slot publishes remote catalog_xmin after local decoding |