Re: Support EXCEPT for TABLES IN SCHEMA publications

From: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
To: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Support EXCEPT for TABLES IN SCHEMA publications
Date: 2026-07-30 06:03:08
Message-ID: CABdArM7iswxPXwXFuNNX4PGMk8vQTLjsAL+YewZtkJ-D7Q+Rug@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 28, 2026 at 2:38 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> Nisha, the changes in RelationBuildPublicationDesc() looks quite
> tricky now. We are doing 'list_difference_oid' thrice:
>
> --for schema-pub
> --for schmea-pubs on complete ancestor tree
> --for all-tables pub
>
> Ultimately we are concatenating all individual pubids after
> subtracting 'exceptpuboids' from each individual 'puboids' list. The
> 'exceptpuboids' is computed only once and doesn't change with each
> computation. Why don't we uncondiitonally do list_concat_unique_oid
> for all pub-ids
> and only minus 'exceptpuboids' once at the end? Won't it work? Let me
> know if I am missing something.
>

Done as suggested. The change modifies the existing code slightly, but
the function now seems simpler and easier to read overall. It works
well based on my testing. I'll do a deeper analysis to ensure it
doesn't change any existing behavior.

> ~~
>
> I think, we can now merge 002 to 001, it will help in combined review
> by placing except-validation logic where it should ultimately be.
>

Merged both into v24-0001.
~~~

Attached v24 patch set.

--
Thanks,
Nisha

Attachment Content-Type Size
v24-0001-Support-EXCEPT-clause-for-schema-level-publicati.patch application/octet-stream 84.0 KB
v24-0002-Add-EXCEPT-support-to-ALTER-PUBLICATION-ADD-TABL.patch application/octet-stream 22.3 KB
v24-0003-Add-EXCEPT-support-to-ALTER-PUBLICATION-SET-TABL.patch application/octet-stream 27.4 KB
v24-0004-Documentation-Patch.patch application/octet-stream 11.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nisha Moond 2026-07-30 06:03:20 Re: Support EXCEPT for TABLES IN SCHEMA publications
Previous Message Rafia Sabih 2026-07-30 06:02:15 Re: Fix BUG #19586: money division overflow for INT64_MIN / -1