Re: Skipping schema changes in publication
Nisha Moond <nisha.moond412@gmail.com>
From: Nisha Moond <nisha.moond412@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
Andrei Lepikhov <lepihov@gmail.com>, shveta malik <shveta.malik@gmail.com>, Shlok Kyal <shlok.kyal.oss@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-11T05:41:29Z
Lists: pgsql-hackers
On Tue, Mar 10, 2026 at 6:19 PM vignesh C <vignesh21@gmail.com> wrote:
>
> Thanks for the comments, these are addressed in the v61 version patch attached.
>
Thanks for the patch, I have few comments:
1) publicationcmd.c: CheckAlterPublication()
After the recent change to use stmt->for_all_tables, the
"excepttables" parameter is no longer used in this function and can be
removed.
~~~
Couple of minor suggestions:
2)
+ if (stmt->for_all_tables && !superuser())
+ ereport(ERROR,
+ errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
+ errmsg("must be superuser to define FOR ALL TABLES publication"));
+
Since this check is in the context of ALTER PUBLICATION, should the
error message instead be:
"must be superuser to alter FOR ALL TABLES publication"
3) test comment in publication.sql:1015 -
"-- fail - ADD/DROP EXCEPT table requires superuser privileges"
The test uses only SET, not ADD/DROP, so the comment could be updated to:
-- fail - modifying EXCEPT table list requires superuser privileges
(I’m also fine with any better alternative.)
--
Thanks,
Nisha
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