Re: Skipping schema changes in publication

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(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-02-09 06:22:55
Message-ID: CAKFQuwauV8v46mM3kZ9ducnN9Oq6E2etLbvf5KxVj4K0CEZKHg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sunday, February 8, 2026, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:

> On Mon, Feb 9, 2026 at 6:41 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> > Hi Amit.
> >
> > I understand there can be some tricky scenarios where partitions are
> > involved, but I was not sure why "pub1: FOR ALL Tables EXCEPT (tab1)
> > and pub2: FOR TABLE tab1" is an example of contradictory behaviour.
> >
> > Consider if the publisher has 3 tables tab1,tab2,tab3:
> > Here, "pub1: FOR ALL Tables EXCEPT (tab1)" is like a shorthand for
> > saying "pub1: FOR TABLE tab2,tab3"
> > So what's wrong for the subscriber to combine pub1 and pub2 in this case?
> >
>
> It is because one of the publications (pub2) indicates to include a
> particular table tab1 and the other one (pub1) to exclude the same
> table. And things become much more complex when the Except list
> contains partitions as shown in Shveta's example. So, I think it makes
> sense to keep things simple at least for the first version, we can
> consider to uplift this restriction if we see some use cases from the
> field.
>
>
>
I’m with Peter here - I do not think it is wise to expose the exception
listing outside the publication. Publication combinations should be purely
additive in much the same way grants are in the system. Except lists are
internal shorthand for describing the positive list of tables a publication
makes available - all tables except.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hüseyin Demir 2026-02-09 06:24:42 Re: BUG #19393: pg_upgrade fails with duplicate key violation when CHECK constraint named *_not_null exists
Previous Message jian he 2026-02-09 06:13:11 make collate.linux.utf8 test run on more places