Re: Support EXCEPT for ALL SEQUENCES publications

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

From: Shlok Kyal <shlok.kyal.oss@gmail.com>
To: Ashutosh Sharma <ashu.coek88@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>, shveta malik <shveta.malik@gmail.com>, vignesh C <vignesh21@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-07-07T06:36:48Z
Lists: pgsql-hackers

Attachments

On Mon, 6 Jul 2026 at 11:34, Ashutosh Sharma <ashu.coek88@gmail.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

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Doc: Clarify that publication exclusions track table identity.

  2. Use schema-qualified names in EXCEPT clause error messages.

  3. psql: Improve describe footer titles for publications.

  4. Improve various new-to-v19 appendStringInfo calls