Re: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc. - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc.
Date
Msg-id CAA4eK1Kz_JWAEmzTMSmGGPnxM0=EAZG_WcNB5dz2We6ezVW1DQ@mail.gmail.com
Whole thread
In response to CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc.  (Noah Misch <noah@leadboat.com>)
Responses Re: [PATCH] Remove obsolete tupDesc assignment in extended statistics
Re: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc.
List pgsql-hackers
On Fri, Jul 31, 2026 at 9:50 AM Jeff Davis <pgsql@j-davis.com> wrote:
>
> >
> >
> >  * Ensure that none of the commands during restore need a connection.
> >    - check_pub_rdt should happen at connection time, and only
> >      opportunistically at DDL time if already forming a connection
> >
>
> Amit, this series does not include the check_pub_rdt change to move it
> to the worker.
>

I looked into this problem and agreed that authoritative checking
required for 'rdt' should be done in the worker as even after DDL the
upstream can change.  However, I feel it is better to detect the same
at DDL time whenever possible as well as it gives immediate,
synchronous feedback for interactive CREATE/ALTER, whereas a
worker-only failure just lands in the server log and the worker keeps
restarting. Removing it would also mean enabling retain_dead_tuples no
longer validates the publisher at all in the common interactive case.
The only where the DDL-time check is actively harmful is binary
upgrade, where we are just recreating catalog state and must not
connect. So, I would avoid doing that by using IsBinaryUpgrade similar
to how we do in launcher and also add worker-level check as done in
attached.

--
With Regards,
Amit Kapila.

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Increase repalloc_array() usage in buffile.c
Next
From: "Alberto Piai"
Date:
Subject: Re: tablecmds: fix bug where index rebuild loses replica identity on partitions