Re: Support EXCEPT for ALL SEQUENCES publications

shveta malik <shveta.malik@gmail.com>

From: shveta malik <shveta.malik@gmail.com>
To: Shlok Kyal <shlok.kyal.oss@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>, vignesh C <vignesh21@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, shveta malik <shveta.malik@gmail.com>
Date: 2026-06-24T09:51:35Z
Lists: pgsql-hackers
On Tue, Jun 23, 2026 at 3:03 PM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
>
>
> I have addressed the comments and attached the updated v12 patch
>

Thanks Shlok. I have resumed review of this thread. A few comment for 001:


1)

Can we make 'opt_sequence' (SEQUENCE | EMPTY) similar to opt_table and
then use it here. It will be similar to pub_except_tbl_list and easier
to understand.

2)
getPublications:
+ if (relkind == RELKIND_SEQUENCE)
+ simple_ptr_list_append(&pubinfo[i].except_sequences, tbinfo);
+ else
+ simple_ptr_list_append(&pubinfo[i].except_tables, tbinfo);

Can we do this:
if (relkind == RELKIND_SEQUENCE)
    ...
else if (relkind == RELKIND_RELATION ||
         relkind == RELKIND_PARTITIONED_TABLE)
    ...
else
    Assert(false);


3)
describeOneTableDetails:
+ * Skip entries where this sequence appears in the publication's
+ * EXCEPT list.
+ *
+ * For a FOR ALL SEQUENCES publication, pg_publication_rel
+ * contains entries only for sequences specified in the EXCEPT
+ * clause, so there is no need to check pr.prexcept explicitly.

My personal preference will be to have pr.prexcept check in the query
and get rid of this comment.

4)
- char    *footers[3] = {NULL, NULL, NULL};
+ char    *footers[4] = {NULL, NULL, NULL, NULL};

Is this intentional? We are using only 3 of these though.

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