| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Review items for EXCEPT TABLE publication |
| Date: | 2026-09-10 09:31:19 |
| Message-ID: | CAA4eK1KAENLAxfM_9wJ2Avg0u0OpFCTY_t6hMt12+rtnWEXP0g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Sep 10, 2026 at 1:24 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>
> > On Sep 10, 2026, at 13:39, vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > Finding #5: SET UNLOGGED on an excluded table produces an unrestorable
> > catalog state
> >
>
> For v1-0005, the code change itself looks good to me.
>
> However, I have some concern about the design. Since a table in the EXCEPT list is not published anyway, do we really need to reject SET UNLOGGED? Would it make more sense to remove the table from the EXCEPT list and emit a NOTICE to inform the user?
>
I think removing the publication membership during another DDL will
unnecessarily widen the scope of publication memberships. For example,
consider, later one does, ALTER TABLE t SET LOGGED emits nothing, and
t is now published by p.
This is the damaging one and NOTICE in the previous message doesn't
prevent it. Either the subscriber lacks t, in which case apply fails
and the whole subscription
stalls, or it has t, in which case data the user deliberately excluded
starts flowing. Both are triggered by a local DDL statement with no
indication that replication scope just widened.
Also, it would be inconsistent with the INCLUDED case where we are
giving ERROR. I feel giving ERROR is the right thing to do here, so
that users can explicitly remove it from EXCEPT list and then later if
She wants to make table LOGGED again, She can execute following steps:
BEGIN;
ALTER TABLE t SET LOGGED;
ALTER PUBLICATION p SET ALL TABLES EXCEPT (TABLE t, ...);
COMMIT;
--
With Regards,
Amit Kapila.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Guo | 2026-09-10 09:33:37 | Re: remove_useless_joins vs. bug #19560 |
| Previous Message | Suraj Kharage | 2026-09-10 09:28:31 | Re: [PATCH] Add support for INSERT ... SET syntax |