Re: Skipping schema changes in publication

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Andrei Lepikhov <lepihov(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, YeXiu <1518981153(at)qq(dot)com>, Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Skipping schema changes in publication
Date: 2026-03-09 02:52:31
Message-ID: CALDaNm34tpJDVxEr70dmggY6sWyJxvaSuHN+pW2B6skTtjs46A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 7 Mar 2026 at 06:41, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Fri, Mar 6, 2026 at 6:25 PM Andrei Lepikhov <lepihov(at)gmail(dot)com> wrote:
> >
> > On 6/3/26 11:56, Amit Kapila wrote:
> > >
> > > Option-1: ALTER PUBLICATION pub1 SET ALL TABLES; This suggests it is
> > > still an ALL TABLES publication, but providing a new definition. Since
> > > it didn't include an EXCEPT clause this time, the exception list is
> > > now empty.
> >
> > I vote for a style that allows incremental add/remove table.
> >
> > > If we follow the first one, then we can choose "ALTER PUBLICATION pub1
> > > SET ALL TABLES EXCEPT TABLE (t1)" to set a new except list instead of
> > > "ALTER PUBLICATION pub1 SET EXCEPT TABLE (t1)"
> > This approach works best for me. It also matches the internal
> > replication logic: take the new publication state, compare it with the
> > old one, and process the differences.
> >
>
> So, to summarize based on your and Dilip's inputs, the following
> syntax will be preferable to set/reset EXCEPT list: (a) To set a
> except table list to a different list than what is defined originally,
> we will use: "ALTER PUBLICATION pub1 SET ALL TABLES EXCEPT TABLE (t1,
> ..)" (b) To reset the entire except list, we will use "ALTER
> PUBLICATION pub1 SET ALL TABLES".

The attached v59 patch has the changes to update the syntax accordingly.

Regards,
Vignesh

Attachment Content-Type Size
v59-0001-Support-SET-ALL-TABLES-EXCEPT-TABLE-in-ALTER-PUB.patch application/octet-stream 22.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2026-03-09 03:01:44 Re: DOCS - pg_walsummary typo?
Previous Message Peter Smith 2026-03-09 02:23:32 Re: DOCS - pg_waldump synopsis sgml markup