| From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
|---|---|
| To: | Baji Shaik <baji(dot)pgdev(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 19:40:17 |
| Message-ID: | CAD21AoBY94-YywOyVQKabX55+RQiKN_+OxT6e=95fjVo89RzsA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Dec 4, 2026 at 8:51 AM Baji Shaik <baji(dot)pgdev(at)gmail(dot)com> wrote:
>
> Hello Chao,
>
> On Thu, Dec 3, 2026 at 9:11 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>>
>>
>> Maybe we can add a check to “pg_upgrade --check”, so that users can detect the error earlier and fix it before an actual upgrade. But I have no idea how we can improve pg_restore to handle existing invalid slot names.
>
>
> Thank you for reviewing.
> For existing databases, a pg_upgrade --check check would catch them.
> But such a subscription can never have replicated, so I'm not sure
> it's common enough to be worth a new check, given the discussion in
> [1]. I'm fine either way.
Yeah, I'm concerned that it's too much for such a rare case.
>
>>
>> WRT v2, I don’t think we should block “none”, because doing so will lead to inconsistent behaviors:
>
>
> Agreed on "none", but for a different reason like a subscription named
> none works today with connect = true. The slot "none" is created on
> the publisher and it replicates fine, so blocking it, or treating it as
> no slot, would break that. v3 drops it. The dump issue remains, since
> slot_name = 'none' restores as no slot, but that's existing behavior.
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?
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jacob Champion | 2026-12-04 19:51:14 | Re: [PATCH] Clarify that ssl_groups is for any key exchange groups |
| Previous Message | Jacob Champion | 2026-12-04 19:27:22 | Re: [PATCH] Clarify that ssl_groups is for any key exchange groups |