Re: Distinguish publication exclusions in object addresses

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: Distinguish publication exclusions in object addresses
Date: 2026-09-15 04:57:57
Message-ID: CAJpy0uBvO1_LYQm2HF-+zmc=jLX=+J_4dMhD0Tk+EzF4ZCe8UA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 14, 2026 at 7:23 PM Zhijie Hou (Fujitsu)
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> Hi,
>
> On Monday, September 14, 2026 12:29 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> > The attached patches have the changes for the same.
> > v1-0001-Distinguish-publication-exclusions-in-object-addr.patch is the same
> > Fujii Masao-san's patch from [2]. The comment fixes are present in
> > v1-0002-Review-comment-fixes.patch which is a top-up patch on top of Fujii
> > Masao-san's patch.
>
> Thanks for sharing the patches.
>
> I have one question for 0001:
>
> The changes in pg_get_object_address() look a bit hacky to me. Instead of
> hard-coding a string comparison and adding a special branch to handle the
> excluded publication relation, wouldn't it be more standard to introduce a new
> object type, such as OBJECT_PUBLICATION_EXCLUDED_REL?

+1. pg_get_object_address() copies a part of get_object_address() in
'if' branch while 'else' branch still relies on get_object_address().
If in future concerned part of get_object_address() changes, the
similar change will be needed in 'if-branch', which an easily be
missed.

> I think that would make
> the code more elegant, and we could pass the object type directly to
> get_object_address_publication_rel() instead of using a Boolean flag. That said, are
> there any reasons we cannot add a new object type?
>
> Best Regards,
> Zhijie Hou

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2026-09-15 05:32:58 Re: PGQ catalog representation and pg_dump support
Previous Message solai v 2026-09-15 04:44:39 Re: Convert ALL SubLinks to ANY SubLinks