Re: Support EXCEPT for ALL SEQUENCES publications

From: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
To: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Support EXCEPT for ALL SEQUENCES publications
Date: 2026-07-07 06:36:48
Message-ID: CANhcyEUg0c2rMEWt=2DFLF+frxx72AyqXn2viyye5uvb8Fmn0g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 6 Jul 2026 at 11:34, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> wrote:
>
> Thanks for fixing this. I found a few cosmetics issues while reviewing
> the latest patches, please see if these make sense to you:
>
> +# Check ALTER PUBLICATION ... ALL SEQUENCES (EXCEPT SEQUENCE ...)
> +$node_publisher->safe_psql(
>
> The placement of the EXCEPT clause here doesn't match the actual
> supported syntax. The correct form is:
>
> CREATE PUBLICATION combined_pub_seq FOR ALL SEQUENCES EXCEPT ( SEQUENCE ... )
>
> --
>
> + * Get the list of tables and sequences for publications specified in
> + * the EXCEPT clause.
>
> Above comment doesn't look clearer to me. Perhaps something like "for
> tables and sequences specified in the publication's EXCEPT clause"
> would read more clearly. What do you think?
>
> --
>
> + /* Print publications where the sequence is in the EXCEPT clause */
> + if (pset.sversion >= 200000)
>
> This doesn't read well as well, how about "Print publications whose
> EXCEPT clause contains this sequence"?
>
> --
>
> + * In FOR ALL TABLES/ FOR ALL SEQUENCES mode, relations are
>
> This seems to be having uneven spacing. I would rather replace '/'
> with 'or' here.
>
Hi Ashutosh,

Thanks for reviewing the patch.
I agree with your comments and addressed it in the lastest v19 patch.

I also noticed that the CI runs are failing.
It is failing because of the new test added in 0002 patch.
After we alter the publication and change the sequences in the EXCEPT
list, we should run 'ALTER SUBSCRIPTION ... REFRESH PUBLICATION' on
the subscription, so the same is reflected on the pg_subscription_rel.
I have made the change for the same in the updated patch.

Thanks
Shlok Kyal

Attachment Content-Type Size
v19-0002-Support-EXCEPT-for-ALL-SEQUENCES-in-ALTER-PUBLIC.patch application/octet-stream 34.6 KB
v19-0001-Support-EXCEPT-for-ALL-SEQUENCES-in-CREATE-PUBLI.patch application/octet-stream 67.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2026-07-07 06:47:21 Re: Add enable_groupagg GUC parameter to control GroupAggregate usage
Previous Message Michael Paquier 2026-07-07 06:36:09 Re: Use HostsFileName everywhere