Re: Skipping schema changes in publication

shveta malik <shveta.malik@gmail.com>

From: shveta malik <shveta.malik@gmail.com>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Shlok Kyal <shlok.kyal.oss@gmail.com>, vignesh C <vignesh21@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, Peter Smith <smithpb2250@gmail.com>, Dilip Kumar <dilipbalaut@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>, shveta malik <shveta.malik@gmail.com>
Date: 2026-02-13T11:41:08Z
Lists: pgsql-hackers
On Thu, Feb 12, 2026 at 1:58 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Wed, Feb 11, 2026 at 11:58 PM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
>>
>>
>> We have addressed the comments in the latest v43 patch.
>
>
> Non-comprehensive review.

Thanks, we will review and address these.

> Shouldn't the early exits look like:
>
> <begin function>
> if (list_length(publications) < 2)
>     return;
>
> perform query here, capture except_publications
>
> if (list_length(except_publications) < 2)
>     return;
>
> construct error message and ereport
> <end function>
>
>
> + if (publication_has_any_exception(puboid))
> + {
> + except_pub_names = lappend(except_pub_names,
> +   makeString(pubform->pubname.data));
> + has_any_exclusion = true;
> + except_pub_id = pubform->oid;
> + }
>
> Either rename has_any_exclusion to has_any_exception or, given how ambiguous that reads in code, maybe standardize on calling these exclusions throughout the code and either just accept we've chosen EXCEPT for the syntax for good reasons or consider whether to EXCLUDING (table1, table2) would be a better choice.

We have chosen 'EXCEPT' based on [1]. There were agreements on this,
see [2]. We will modify function names and comments to be in sync with
the 'EXCEPT' keyword.

[1]: https://www.postgresql.org/message-id/CAJpy0uCM40%2Bcu8va2HBqE-pazPjhNdTDAQqK3nWbs4%2B5fs4Mxw%40mail.gmail.com
[2]: https://www.postgresql.org/message-id/CAFiTN-vMpoX%3DTnxZq2_CmAH_k_DnJLp1Tu7-YT%2BuWvNGoPzfxg%40mail.gmail.com

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.