Re: Support EXCEPT for TABLES IN SCHEMA publications
Nisha Moond <nisha.moond412@gmail.com>
From: Nisha Moond <nisha.moond412@gmail.com>
To: Peter Smith <smithpb2250@gmail.com>
Cc: shveta malik <shveta.malik@gmail.com>,
Amit Kapila <amit.kapila16@gmail.com>, Zsolt Parragi <zsolt.parragi@percona.com>, pgsql-hackers@lists.postgresql.org
Date: 2026-07-08T15:22:17Z
Lists: pgsql-hackers
On Mon, Jul 6, 2026 at 1:25 PM Peter Smith <smithpb2250@gmail.com> wrote: > > Hi Nisha. > > Some review comments for v18. > > ////////// > Patch v18-0001 > ////////// ... > > ~ > > 1b. > Why hint to change the except list -- who says the EXCEPT list is wrong? > > It seemed more like a user error to me if they are trying to drop > something from a publication when it is already excluded. Why does > this need any hint at all? Okay, I see your point. The intent of the hint was to guide users who are actually trying to remove a table from the EXCEPT list by pointing them to SET. I've reworded it to: HINT: Use ALTER PUBLICATION ... SET TABLES IN SCHEMA ... EXCEPT to drop the table from the EXCEPT list. Hopefully this is clearer and more helpful. Let me know if this works, or if you still think no hint is the better option. > > ====== > src/test/regress/sql/publication.sql > > 2. > I did not recognise the distinction in the test comments between > "fail:" and "error:". > Fixed. I now use "fail" consistently throughout. ... > > ////////// > Patch v18-0004 > ////////// > > doc/src/sgml/ref/create_publication.sgml > > 1. > <para> > For partitioned tables, only the root partitioned table may be specified > in <literal>EXCEPT</literal>. Doing so excludes the root table and > - all of its partitions from replication. The optional > + all of its partitions from replication, even any partition that lives > + in a schema which is itself included in the publication. > > BEFORE > For partitioned tables, only the root partitioned table may be > specified in EXCEPT. Doing so excludes the root table and all of its > partitions from replication, even any partition that lives in a schema > which is itself included in the publication. > > SUGGESTION #1 > For partitioned tables, only the root partitioned table may be > specified in EXCEPT. Excluding the root table automatically excludes > all of its partitions from replication, including those in schemas > that are otherwise included in the publication. > > SUGGESTION #2 (TI doubt you even needed to mention about other schemas) > For partitioned tables, only the root partitioned table may be > specified in EXCEPT. Excluding the root table automatically excludes > all of its partitions from replication, including those that would > otherwise be included in the publication. > I lean towards Suggestion #1, as not publishing a table/partition when its schema is published without any exception is a non-obvious case and should be stated explicitly. -- 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 →
-
Doc: Clarify that publication exclusions track table identity.
- 77b6dd909252 19 (unreleased) cited