| From: | vignesh C <vignesh21(at)gmail(dot)com> |
|---|---|
| To: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
| Cc: | 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-13 15:30:53 |
| Message-ID: | CALDaNm0CHSrLJ70C70V-ukYsBMjuNvNWQcbwDqknzG2MMM_wyw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, 7 Aug 2026 at 16:20, shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> Agree with the problem statement and the approach. Please find a few
> initial comments, will review in detail next week.
>
> 1)
> getObjectTypeDescription:
>
> + if (isPublicationRelationExcept(object->objectId, missing_ok))
> + appendStringInfoString(&buffer, "publication exclusion");
> + else
> + appendStringInfoString(&buffer, "publication relation");
>
> It seems strange initially that when missing_okay is true and say
> cache-tuple is missing, we ccnsider it as 'publication relation'. But
> then I checked other calls accepting 'missing_ok' in the same function
> such as: getProcedureTypeDescription, getConstraintTypeDescription.
> They have a fallback option for undefined object. The comment there
> makes it clear. Perhaps we should add similar comment here.
Comment seems sufficient here, added a comment.
> 2)
> It seems that get_object_address_publication_rel() currently performs
> two cache lookups to obtain the complete details of the relation.
> Ideally, a single lookup would suffice, although that would likely
> require restructuring the implementation instead of going through
> isPublicationRelationExcept(). That said, I understand that
> isPublicationRelationExcept() is still needed in other code paths, so
> even though I would prefer a single cache lookup, keeping the current
> approach is fine as well.
I preferred the single lookup approach. The
v1-0002-Review-comment-fixes.patch at [1] has the changes for the
same.
[1] - https://www.postgresql.org/message-id/CALDaNm14MGg8cw3WXyDyt-ry2rh4ifVbsNRVUnwJZcBmxVo%2BRg%40mail.gmail.com
Regards,
Vignesh
| From | Date | Subject | |
|---|---|---|---|
| Next Message | 신성준 | 2026-09-13 15:50:43 | Re: Add wait events for server logging destination writes |
| Previous Message | vignesh C | 2026-09-13 15:28:49 | Re: Distinguish publication exclusions in object addresses |