On Thu, Jul 30, 2026 at 11:33 AM Nisha Moond <[email protected]> wrote:
>
> On Tue, Jul 28, 2026 at 2:38 PM shveta malik <[email protected]> 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.
>

I missed mentioning that, besides the comments, also fixed a bug in describe.
The bug:  with v23, describe (\d t) was incorrectly showing the table
as both included and excluded in same pub -
postgres=# CREATE PUBLICATION p FOR TABLES IN SCHEMA s EXCEPT (TABLE s.t);
CREATE PUBLICATION
postgres=# \d s.t;
                    Table "s.t"
 Column |  Type   | Collation | Nullable | Default
--------+---------+-----------+----------+---------
 a      | integer |           |          |
Included in publications:
    "p"
Excluded from publications:
    "p"

It is now fixed in v24.

--
Thanks,
Nisha


Reply via email to