Re: Skipping schema changes in publication
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Andrei Lepikhov <lepihov@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>, shveta malik <shveta.malik@gmail.com>, Shlok Kyal <shlok.kyal.oss@gmail.com>,
Nisha Moond <nisha.moond412@gmail.com>, Ashutosh Sharma <ashu.coek88@gmail.com>,
"David G. Johnston" <david.g.johnston@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>, Peter Smith <smithpb2250@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>
Date: 2026-03-07T01:11:46Z
Lists: pgsql-hackers
On Fri, Mar 6, 2026 at 6:25 PM Andrei Lepikhov <lepihov@gmail.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". Do let me know if I misunderstood your response? Thanks for the input. -- With Regards, Amit Kapila.
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