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>, Peter Smith <smithpb2250@gmail.com>, Shlok Kyal <shlok.kyal.oss@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>, "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>, Dilip Kumar <dilipbalaut@gmail.com>, shveta malik <shveta.malik@gmail.com>
Date: 2026-03-30T04:36:58Z
Lists: pgsql-hackers
preprocess_except_pubobj_list:

+ Assert(pubobj->pubobjtype == PUBLICATIONOBJ_EXCEPT_TABLE ||
+    pubobj->pubobjtype == PUBLICATIONOBJ_CONTINUATION);
+

We need Sanity check on each object of the list rather than on first
object alone i.e. each object should have type EXCEPT or its
continuation. Thus it makes more sense to move Assert inside 'for
loop' and add a comment too:
<please feel free to change comment if needed>

foreach(cell, pubexceptobjspec_list)
{
   pubobj = (PublicationObjSpec *) lfirst(cell);

   /*
    * The object type must be either PUBLICATIONOBJ_EXCEPT_TABLE or
    * PUBLICATIONOBJ_CONTINUATION. It cannot be PUBLICATIONOBJ_TABLE,
    * PUBLICATIONOBJ_TABLES_IN_SCHEMA or
    * PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA here.
    */
   Assert(pubobj->pubobjtype == PUBLICATIONOBJ_EXCEPT_TABLE ||
      pubobj->pubobjtype == PUBLICATIONOBJ_CONTINUATION);
.....

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 →
  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.