Re: Distinguish publication exclusions in object addresses - Mailing list pgsql-hackers

From Nisha Moond
Subject Re: Distinguish publication exclusions in object addresses
Date
Msg-id CABdArM53w2YFFFOj+dp5Ybm96CMYm2LFmmRC3cSt=eaSA+eWVA@mail.gmail.com
Whole thread
In response to Re: Distinguish publication exclusions in object addresses  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Distinguish publication exclusions in object addresses
List pgsql-hackers
On Wed, Sep 16, 2026 at 11:21 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Wed, Sep 16, 2026 at 10:21 AM Peter Smith <smithpb2250@gmail.com> wrote:
> >
> > Some review comments for v3:
> >
> > ======
> > Commit Message
> >
> > 1.
> > Fix this by distinguishing EXCEPT entries in the object address code.
> > They are now reported as publication excluded relation, with object
> > identities indicating that the table is excluded from the publication.
> >
> > ~
> >
> > Should "publication excluded relation" be quoted here?
> >
>
> I have changed the commit message.
>
> >
> > ======
> > src/backend/catalog/objectaddress.c
> >
> > 2.
> >  static ObjectAddress
> > -get_object_address_publication_rel(List *object,
> > +get_object_address_publication_rel(ObjectType objtype, List *object,
> >     Relation *relp, bool missing_ok)
> >
> > If not going to describe parameter `objType` then maybe a
> > self-documenting Assert would be good to have here.
> >
>
> Added assert in the attached patch and changed the if/else to simplify the code.
>

Should the new Assert be at the start of the function? At the current
position, we have already locked the relation and done some
unnecessary processing by then.

--
Thanks,
Nisha



pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: ERROR: no relation entry for relid 3
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: pg_createsubscriber does not check output_plugin_libraries