Re: Skipping schema changes in publication

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, YeXiu <1518981153(at)qq(dot)com>, Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: Skipping schema changes in publication
Date: 2026-02-13 11:41:08
Message-ID: CAJpy0uBF+=CCpyuH_mP+JZerF5cnBtHzPCvyQn5+9TneEBrY=w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 12, 2026 at 1:58 PM David G. Johnston
<david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
> On Wed, Feb 11, 2026 at 11:58 PM Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2026-02-13 11:42:29 Re: Follow-up on OpenSSL "engines" and "providers"
Previous Message Amit Kapila 2026-02-13 11:40:23 Re: [PATCH] Support automatic sequence replication