Re: Distinguish publication exclusions in object addresses

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Distinguish publication exclusions in object addresses
Date: 2026-09-16 07:51:12
Message-ID: CAHut+PuVvuy3nJtTdMJ9jBcnSgTEPAiM=oRp4_8tAKTE2oT1=Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 16, 2026 at 5:41 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Wed, Sep 16, 2026 at 12:23 PM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> >
> > On Wed, Sep 16, 2026 at 4:46 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
> > >
> > >
> > >
> > > > On Sep 16, 2026, at 13:50, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > > >
> > > > --
> > > > With Regards,
> > > > Amit Kapila.
> > > > <v4-0001-Distinguish-publication-exclusions-in-object-addr.patch>
> > >
> > > V4 overall looks sold to me. Just a couple of small comments:
> > >
> > > 1
> > > ```
> > > -- No entry of either kind. testpub_default publishes nothing.
> > > SELECT pg_get_object_address('publication excluded relation',
> > > '{public, testpub_tbl1}', '{testpub_default}');
> > > ERROR: publication relation "testpub_tbl1" in publication "testpub_default" does not exist
> > > ```
> > >
> > > For this new test, the error message is a little surprising to me. Since the requested object type is "publication excluded relation", I would expect the error message to say something like:
> > > ```
> > > publication excluded relation "testpub_tbl1" in publication "testpub_default" does not exist
> > > ```
> >
> > +1 this because maybe the reported table name really *does* exist and
> > is part of the publication, even though the message is saying the
> > exact opposite.
> >
>
> Can you share an example of such a case?
>

My example was using 'publication relation' (not 'publication excluded
relation') and I've already shared it.

But that bug (?) already exists because this logic appears only aware
of PUBLICATIONRELMAP rels and is not accounting for FOR ALL TABLES
etc, so it reports an error like
ERROR: "t1" is not a published relation of publication "pub"
even though table public.t1 does exist and really is a published
relation of pub.

======
Kind Regards,
Peter Smith.
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhijie Hou (Fujitsu) 2026-09-16 07:59:58 RE: Race conditions in logical decoding
Previous Message jian he 2026-09-16 07:47:52 Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions