Re: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc.

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, yuanchao zhang <145zhangyc(at)gmail(dot)com>
Subject: Re: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc.
Date: 2026-07-31 08:42:18
Message-ID: CAA4eK1Kz_JWAEmzTMSmGGPnxM0=EAZG_WcNB5dz2We6ezVW1DQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 31, 2026 at 9:50 AM Jeff Davis <pgsql(at)j-davis(dot)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 Content-Type Size
v1-0001-Validate-publisher-for-retain_dead_tuples-at-appl.patch application/octet-stream 5.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2026-07-31 08:44:13 Re: Support EXCEPT for TABLES IN SCHEMA publications
Previous Message Филиппов Степан 2026-07-31 08:35:50 [PATCH] Fix timeline history after recovery stops on an ancestor