Re: Skipping schema changes in publication

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Cc: Shlok Kyal <shlok.kyal.oss@gmail.com>, Peter Smith <smithpb2250@gmail.com>, vignesh C <vignesh21@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>, shveta malik <shveta.malik@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, Nisha Moond <nisha.moond412@gmail.com>, Ashutosh Sharma <ashu.coek88@gmail.com>, "David G. Johnston" <david.g.johnston@gmail.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-30T09:13:48Z
Lists: pgsql-hackers
On Mon, Mar 30, 2026 at 11:21 AM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:
>
> On Saturday, March 28, 2026 4:50 AM  Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
> >
> > On Fri, 27 Mar 2026 at 18:04, Amit Kapila <amit.kapila16@gmail.com> wrote:
> > >
> > >
> > > BTW, why do we need preprocess_except_pubobj_list?
> > >
> > It is needed to check if the first table in the EXCEPT list is specified with TABLE
> > Keyword.
> > For example: create publication pub1 for all tables except (t1, t2); This should
> > throw an error because t1 is specified without the TABLE keyword.
> >
> > We have a similar logic for FOR TABLE or FOR TABLES IN SCHEMA
> > publications in 'preprocess_pubobj_list'
>
> The preprocess_pubobj_list function was originally introduced to handle mixed
> object types (SCHEMA and TABLE) in the main list, allowing type-specific
> processing per item. However, the EXCEPT clause currently only supports TABLE
> objects. So strictly speaking, we don't need a similar preprocessing function
> here, at least not until we support other object types in the EXCEPT clause.
>

Fair enough. We could extend it later as and when required. I have one
minor comment:

*
+ | pub_except_obj_list ',' TABLE PublicationExceptObjSpec
+ { $$ = lappend($1, $4); }
  | pub_except_obj_list ',' PublicationExceptObjSpec

Can we encapsulate 'TABLE PublicationExceptObjSpec' and
'PublicationExceptObjSpec' into separate 'opt_tbl_except_obj_spec'?

-- 
With Regards,
Amit Kapila.



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix miscellaneous issues in EXCEPT publication clause.

  2. Change syntax of EXCEPT TABLE clause in publication commands.

  3. Add support for EXCEPT TABLE in ALTER PUBLICATION.

  4. Allow table exclusions in publications via EXCEPT TABLE.

  5. Add wait_for_subscription_sync for TAP tests.