Re: Skipping schema changes in publication
shveta malik <shveta.malik@gmail.com>
From: shveta malik <shveta.malik@gmail.com>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
Peter Smith <smithpb2250@gmail.com>, Shlok Kyal <shlok.kyal.oss@gmail.com>, vignesh C <vignesh21@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>,
"Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, YeXiu <1518981153@qq.com>, Ian Lawrence Barwick <barwick@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
shveta malik <shveta.malik@gmail.com>
Date: 2026-02-10T06:05:13Z
Lists: pgsql-hackers
On Mon, Feb 9, 2026 at 11:52 AM David G. Johnston <david.g.johnston@gmail.com> wrote: > > On Sunday, February 8, 2026, Amit Kapila <amit.kapila16@gmail.com> wrote: >> >> On Mon, Feb 9, 2026 at 6:41 AM Peter Smith <smithpb2250@gmail.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. > The earlier case - pub1: FOR ALL TABLES EXCEPT (tab1) pub2: FOR TABLE tab1 WHERE (c = 99) seems a valid scenario, and we are currently evaluating its implementation feasibility under Approach 1. OTOH, subscribing to two different publications that are both defined as 'FOR ALL TABLES' but have different EXCEPT lists introduces unnecessary implementation complexity without a clear business use case. This becomes especially complex when the publications exclude different partitions of the same partitioned table. For example: pub1: FOR ALL TABLES EXCEPT (part1, part2) WITH (publish_via_partition_root=true) pub2: FOR ALL TABLES EXCEPT (part7) WITH (publish_via_partition_root=false) IMO, there is no clear need for a user to create multiple 'ALL TABLES' publications with different EXCEPT lists and then combine them at the subscriber level. Given this, to keep the patch simpler, we plan to emit an error for this scenario (multi-pub EXCEPTs case) for now. If a valid requirement emerges in the future, we can revisit and consider supporting it. thanks Shveta
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix miscellaneous issues in EXCEPT publication clause.
- 6b0550c45d13 19 (unreleased) landed
-
Change syntax of EXCEPT TABLE clause in publication commands.
- 5984ea868eee 19 (unreleased) landed
-
Add support for EXCEPT TABLE in ALTER PUBLICATION.
- 493f8c6439cf 19 (unreleased) landed
-
Allow table exclusions in publications via EXCEPT TABLE.
- fd366065e06a 19 (unreleased) landed
-
Add wait_for_subscription_sync for TAP tests.
- 0c20dd33db16 16.0 cited