| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
| Cc: | cca5507 <cca5507(at)qq(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Redundant syscache access in get_rel_sync_entry() |
| Date: | 2024-07-12 01:25:32 |
| Message-ID: | ZpCGDOy8w_cm5oPH@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Jul 11, 2024 at 07:10:58PM +0530, Ashutosh Bapat wrote:
> I think it's just convenient. We do that at multiple places; not exactly
> these functions but functions which fetch relation attributes from cached
> tuples. Given that the tuple is cached and local to the backend, it's not
> too expensive. But if there are multiple places which do something like
> this, we may want to create more function get_rel_* function which return
> multiple properties in one function call. I see get_rel_namspace() and
> get_rel_name() called together at many places.
That's not worth the complications based on the level of caching.
This code is fine as-is.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2024-07-12 01:50:57 | Re: Allow non-superuser to cancel superuser tasks. |
| Previous Message | Thomas Munro | 2024-07-12 01:17:23 | Re: Clang function pointer type warnings in v14, v15 |