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

From: Roberto Mello <roberto(dot)mello(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: sawada(dot)mshk(at)gmail(dot)com, baji(dot)pgdev(at)gmail(dot)com, zsolt(dot)parragi(at)percona(dot)com, li(dot)evan(dot)chao(at)gmail(dot)com
Subject: Re: pg_dump writes a subscription's default slot name, which can't be restored
Date: 2026-12-06 02:09:05
Message-ID: CAKz==bLOXqsDaJBfhxSXGGpVSXAZ6v-hy4=4gAo6P9VGxE=uUw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Masahiko Sawada wrote:
> 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?

+1. On master (8d90516), CREATE SUBSCRIPTION none ... WITH (connect =
false), then pg_dump -Fc / pg_restore into a new database: the restore
succeeds with no error, and subslotname is NULL. Losing it silently is
worse than an error at CREATE time. "MySub" fails on restore as Baji
described. With v4 both are rejected at CREATE and sub_ok is unaffected.

No strong opinion on the wording; Zsolt's "is reserved" matching
pg_conflict_detection seems fine to me.

On Zsolt's pg_createsubscriber point: I tried it on master (8d90516) with a
primary and a pg_basebackup standby, using --subscription=none and no
--replication-slot. It creates the slot "none", then CREATE SUBSCRIPTION
... slot_name = 'none' stores a NULL slot name, then ALTER SUBSCRIPTION
"none" ENABLE fails with "cannot enable subscription that does not have a
slot name". The tool exits 1, drops the slot and leaves the converted
standby with a disabled subscription and no slot. (Tested on master only,
not with v4.)

Roberto

Browse pgsql-hackers by date

  From Date Subject
Next Message Roberto Mello 2026-12-06 02:20:41 Re: FULL JOIN planning failure with virtual generated columns
Previous Message Ishjaap Singh 2026-12-06 01:38:01 Re: [PATCH] Add sampling statistics to autoanalyze log output