Re: Skipping schema changes in publication

Shlok Kyal <shlok.kyal.oss@gmail.com>

From: Shlok Kyal <shlok.kyal.oss@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: shveta malik <shveta.malik@gmail.com>, vignesh C <vignesh21@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-02-19T04:45:24Z
Lists: pgsql-hackers
On Wed, 18 Feb 2026 at 12:20, Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Tue, Feb 17, 2026 at 5:08 PM shveta malik <shveta.malik@gmail.com> wrote:
> >
> > 10)
> > CreatePublication() has changed the way we process publications.
> > Earlier, we had explicit checks for publication types such as
> > 'for_all_tables' and 'for_all_sequences' etc, which made the code
> > easier to follow. That differentiation based on publication type is no
> > longer there. As an example,
> > we now invoke functions like TransformPubWhereClauses() and
> > CheckPubRelationColumnList() even for FOR ALL TABLES ... EXCEPT
> > publications, which are not needed. We could consider restoring the
> > previous structure, where logic was clearly separated based on
> > publication type.
> >
>
> Yeah, we can do that if it doesn't add more complexity w.r.t except
> clause because the proposed approach tries to unify the code path
> where we need to add relations to pg_publication_rel. I think we are
> doing some of the new stuff even for all sequences case as well which
> is not required for the patch. If we want we can keep a flag
> indicating the presence of the except flag in CreatePublicationStmt to
> simplify the handling. BTW, the patch doesn't implement EXCEPT clause
> for ALL SEQUENCES, is it because we want to deal with that separately
> to avoid additional complexity in the patch? Otherwise, I think that
> is a natural extension of this work.
>
I have made the change as per Shveta's suggestion in the v46 patch [1].

We did not implement the EXCEPT clause for ALL SEQUENCES to avoid
additional complexity in the patch. And thought of implementing it
after this patch gets committed.
What do you suggest? Is it ok or should we also implement EXCEPT
clause for ALL SEQUENCES for this patch itself?

[1]: https://www.postgresql.org/message-id/CANhcyEXBw0NeCmrbzSEQ3bBHzzEwvyLo-rOx0migTtfm-H4sNw%40mail.gmail.com

Thanks,
Shlok Kyal



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.