Re: pg_dump writes a subscription's default slot name, which can't be restored

From: Baji Shaik <baji(dot)pgdev(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Subject: Re: pg_dump writes a subscription's default slot name, which can't be restored
Date: 2026-12-04 16:51:13
Message-ID: CA+fm-ROP+jJCkzE5OF6ixDjDKVeqa2Pf=EkpjtjrVbBFZn6LbQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

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

[1]
https://postgr.es/m/CAD21AoBzdxOunP4YONbMuMGuCPJU1NF-iX5wt=kT+Z3-es0vmA@mail.gmail.com

Thanks,
Baji Shaik

Attachment Content-Type Size
v3-0001-Validate-the-default-slot-name-in-CREATE-SUBSCRIP.patch application/octet-stream 6.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2026-12-04 16:52:34 Re: Reapply graceful socket shutdown on Windows (revert 29992a6a509)
Previous Message shihao zhong 2026-12-04 16:49:02 Re: add --transfer-mode to pg_upgrade