Re: Skipping schema changes in publication
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: shveta malik <shveta.malik@gmail.com>
Cc: Shlok Kyal <shlok.kyal.oss@gmail.com>,
Amit Kapila <amit.kapila16@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-02-27T06:39:59Z
Lists: pgsql-hackers
Attachments
- v51-0001-Skip-publishing-the-tables-specified-in-EXCEPT-T.patch (application/octet-stream) patch v51-0001
- v51-0002-Support-SET-EXCEPT-TABLE-in-ALTER-PUBLICATION.patch (application/octet-stream) patch v51-0002
- v51-0003-Support-DROP-EXCEPT-TABLE-in-ALTER-PUBLICATION.patch (application/octet-stream) patch v51-0003
On Thu, 26 Feb 2026 at 11:42, shveta malik <shveta.malik@gmail.com> wrote: > > On Wed, Feb 25, 2026 at 10:43 PM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote: > > > > Hi Shveta, Ashutosh, Chao-san, > > > > Thanks for reviewing the patch. > > I have addressed the above comments and the comments in [1] and [2]. > > Attached is the latest v50 version. > > > > Thank You Shlok. Please find a few comments on v50-001. > > 1) > -check_publication_add_relation(Relation targetrel) > +check_publication_add_relation(PublicationRelInfo *pri, bool puballtables) > > Why do we need argument puballtables? I think we can give partition > related error even without checking 'puballtables', like we are giving > for temp and unlogged table error in EXCEPT list without checking > puballtables. Or let me know if I am missing the point here? This is required as this is a common function used by both all tables and table publication, since we allow child tables in case of table publication, alltables check is required. > 2) > publication_has_any_except_table(): Shall we optimize it: > a) if it is not all-table pub, return false there itself. > b) if it is all table, proceed with fetching tuples. At first tuple we > can break the loop irrespective of check 'pubrel->prexcept', as there > is no other feasibility. But we shall Assert (pubrel->prexcept) . > Thoughts? As Amit is also not in favor of this at [1], I'm not doing any change for this. Rest of the comments are addressed in the attached v51 version. Regarding the 12 comment from [2]: > 12) pg_dump dumped "ONLY" along with ROOT name in EXCEPT. I think it > should be avoided. > pg_dump output: > CREATE PUBLICATION pub4 FOR ALL TABLES EXCEPT TABLE (ONLY > public.tab_root) WITH (publish = 'insert, update, delete, truncate'); I felt this is ok, we dump similarly in case of table publications too like for the below publication: create publication pub1 for table tab_root ; Dump adds only here too: -- -- Name: pub1 tab_root; Type: PUBLICATION TABLE; Schema: public; Owner: vignesh -- ALTER PUBLICATION pub1 ADD TABLE ONLY public.tab_root; Rest of the comments from [2] have been addressed. [1] - https://www.postgresql.org/message-id/CAA4eK1%2BV0-HaxqiEJShTOh5%2BSGw1p4kurK327n8w3WwLV9DD4Q%40mail.gmail.com [2] - https://www.postgresql.org/message-id/CAJpy0uDRv%3DVuG439QTVaX6pgBSvpzAQd5Px9qH%2BE-XAnwpMuDQ%40mail.gmail.com Regards, Vignesh
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