Re: Skipping schema changes in publication
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Shlok Kyal <shlok.kyal.oss@gmail.com>
Cc: Nisha Moond <nisha.moond412@gmail.com>,
Amit Kapila <amit.kapila16@gmail.com>, shveta malik <shveta.malik@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-04T08:24:29Z
Lists: pgsql-hackers
Attachments
- v56-0001-Allow-table-exclusions-in-publications-via-EXCEP.patch (application/octet-stream) patch v56-0001
On Tue, 3 Mar 2026 at 21:17, Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
>
> On Tue, 3 Mar 2026 at 15:45, Nisha Moond <nisha.moond412@gmail.com> wrote:
> >
> > On Mon, Mar 2, 2026 at 6:51 PM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
> > >
> > > Attached the updated v54 patch.
> > >
> >
> > Few comments for v54 patch -
> > 1) The partition description shows the publication name which it is
> > excluded from.
> > simple test case:
> >
> > CREATE TABLE t_part (a int) PARTITION BY RANGE(a);
> > CREATE TABLE t_part_p1 PARTITION OF t_part FOR VALUES FROM (0) TO (100);
> > CREATE PUBLICATION pub_p1 FOR ALL TABLES EXCEPT TABLE (t_part);
> > postgres=# \d t_part_p1
> > Table "public.t_part_p1"
> > Column | Type | Collation | Nullable | Default
> > --------+---------+-----------+----------+---------
> > a | integer | | |
> > Partition of: t_part FOR VALUES FROM (0) TO (100)
> > Publications:
> > "pub_p1"
> > ~~~
> >
> Fixed. Added a test for it as well.
>
> > 2) File: 037_rep_changes_except_table.pl:147
> > +# Verify that data inserted into a table listed in the EXCEPT clause is not
> > +# published.
> > +$result = $node_publisher->safe_psql('postgres',
> > + "SELECT count(*) = 0 FROM
> > pg_logical_slot_get_binary_changes('test_slot', NULL, NULL,
> > 'proto_version', '1', 'publication_names', 'tap_sub_schema')"
> > +);
> >
> > There seems to be a mistake in the publication name in the above call
> > as tap_sub_schema is a subscription name.
> > ~~~
> > Couple of minor comments:
> > 3) File: pgouput.c
> > + /*
> > + * For a parition, changes are published via top-most
> > + * ancestor when pubviaroot is true, so populate pub_relid
> > + * accordingly
> > + */
> >
> > 3a) typo parition -> partition
> > 3b) There should be a full stop (.) at the end i.e. after accordingly
> > ~~~
> >
> > File: pg_publication.c
> > + else
> > + errormsg = gettext_noop("cannot add relation \"%s\" to publication");
> > +
> > +
> > + /* If in EXCEPT clause, must be root partitioned table */
> >
> > >> there is an extra empty line
> > ~~~
> >
> I have addressed the remaining comments as well.
> I have also addressed the comments by Amit and Shveta in [1] and [2].
>
> Attached the latest v55 patch.
Here is an updated version with a couple of typos fixed and separated
the describe table query based on versions which make it more easier
to read.
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