Re: Skipping schema changes in publication
shveta malik <shveta.malik@gmail.com>
From: shveta malik <shveta.malik@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: Amit Kapila <amit.kapila16@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>,
shveta malik <shveta.malik@gmail.com>
Date: 2026-03-05T11:52:09Z
Lists: pgsql-hackers
On Thu, Mar 5, 2026 at 3:05 PM vignesh C <vignesh21@gmail.com> wrote:
>
>
> Here is the rebased patch for the remaining items in the patch series.
>
Thanks. Please find a few comments for 001:
1)
alter_publication.sgml:
The SET clause will replace the list of except tables/tables/schemas
in the publication with the specified list
The order is difficult to read. Would it be better to say it in this
order: tables/schemas/except-tables
2)
postgres=# ALTER TABLE tab_top_root ATTACH PARTITION tab_root FOR
VALUES FROM (0) TO (2000);
ERROR: cannot attach table "tab_root" as partition because it is
referenced in publications "pub1", "pub3" EXCEPT clause
DETAIL: The publication EXCEPT clause cannot contain tables that are
partitions.
HINT: Modify the publication's EXCEPT clause using ALTER PUBLICATION
... SET EXCEPT TABLE or DROP EXCEPT TABLE before attaching the table.
Shall we shorten the HINT slightly? Is it necessary to explicitly say
"before attaching the table", or can we omit it? Thoughts?
3)
+ if (has_except_table)
+ ereport(ERROR,
+ errcode(ERRCODE_SYNTAX_ERROR),
+ errmsg("EXCEPT TABLE clause allowed only for ALL TABLES PUBLICATION"));
+
In what scenario will we hit it? I could not find one.
4)
-- fail - can't add an EXCEPT TABLE to 'FOR TABLE' publication
ALTER PUBLICATION testpub_fortable ADD EXCEPT TABLE (testpub_tbl1);
ERROR: EXCEPT TABLE clause allowed only for SET clause
Even though the comment says that it is a test for not allowing EXCEPT
TABLE for 'FOR TABLE' (perhaps trying to hit the error in comment 3),
it ultimately hits another error that EXCEPT is not supported with
'ADD'. I think the error in comment-3 is unreachable. Or let me know
if otherwise.
We need to correct the comment here.
5)
-- fail - can't drop an EXCEPT TABLE from 'FOR TABLE' publication
ALTER PUBLICATION testpub_fortable DROP EXCEPT TABLE (testpub_tbl1);
ERROR: EXCEPT TABLE clause allowed only for SET clause
Same is valid for this, comment (i.e. the intent) and error does not match.
~~
Please check other test-cases too for intent and error. There are many
like above.
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