From: Chao Li <li.evan.chao@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Review items for EXCEPT TABLE publication
Date: Fri, 11 Sep 2026 14:04:10 +0800
Message-ID: <99819E74-965E-4FB5-B474-762AC8FD04BB@gmail.com> (raw)
In-Reply-To: <CALDaNm1_L_ZhiBbm-MfhGy5m+azRFhRocN7ViiF2Mjim59UCgw@mail.gmail.com>
References: <CALDaNm1r2MkGu6h8zgU1Kj1sX-FcMQ7wGTeLSnhx-5joiyXEvg@mail.gmail.com>
<D700C437-EDF2-4442-90AD-E1D45F9E50AE@gmail.com>
<CAA4eK1KAENLAxfM_9wJ2Avg0u0OpFCTY_t6hMt12+rtnWEXP0g@mail.gmail.com>
<CALDaNm1_L_ZhiBbm-MfhGy5m+azRFhRocN7ViiF2Mjim59UCgw@mail.gmail.com>
> On Sep 11, 2026, at 12:03, vignesh C <vignesh21@gmail.com> wrote:
>
> On Thu, 10 Sept 2026 at 15:01, Amit Kapila <amit.kapila16@gmail.com> wrote:
>>
>> On Thu, Sep 10, 2026 at 1:24 PM Chao Li <li.evan.chao@gmail.com> wrote:
>>>
>>>> On Sep 10, 2026, at 13:39, vignesh C <vignesh21@gmail.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;
>
> @Chao Li What do you think about proceeding this way, to keep the
> behavior simple and consistent with table publications?
> That is, return an ERROR when changing an EXCEPT-listed table to
> UNLOGGED, similar to the behavior for INCLUDED tables, and require the
> user to explicitly remove the table from the EXCEPT list first and
> then change it to UNLOGGED.
>
> Regards,
> Vignesh
I am fine with that.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: li.evan.chao@gmail.com, vignesh21@gmail.com, amit.kapila16@gmail.com
Subject: Re: Review items for EXCEPT TABLE publication
In-Reply-To: <99819E74-965E-4FB5-B474-762AC8FD04BB@gmail.com>
References: <CALDaNm1r2MkGu6h8zgU1Kj1sX-FcMQ7wGTeLSnhx-5joiyXEvg@mail.gmail.com> <D700C437-EDF2-4442-90AD-E1D45F9E50AE@gmail.com> <CAA4eK1KAENLAxfM_9wJ2Avg0u0OpFCTY_t6hMt12+rtnWEXP0g@mail.gmail.com> <CALDaNm1_L_ZhiBbm-MfhGy5m+azRFhRocN7ViiF2Mjim59UCgw@mail.gmail.com> <99819E74-965E-4FB5-B474-762AC8FD04BB@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox