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

From shveta malik
Subject Re: Distinguish publication exclusions in object addresses
Date
Msg-id CAJpy0uAeQ-5Khwg37q92VJx=1z+3y+N4hEcp_n7bdf7JS_vLXQ@mail.gmail.com
Whole thread
In response to Re: Distinguish publication exclusions in object addresses  (Nisha Moond <nisha.moond412@gmail.com>)
List pgsql-hackers
On Wed, Sep 16, 2026 at 12:00 PM Nisha Moond <nisha.moond412@gmail.com> wrote:
>
> 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.

Yes, that will be better IMO.

thanks
Shveta



pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: [PATCH] Release replication slot on error in SQL-callable slot functions
Next
From: Chao Li
Date:
Subject: Re: [PATCH] Release replication slot on error in SQL-callable slot functions