Re: Redundant syscache access in get_rel_sync_entry() - Mailing list pgsql-hackers

From cca5507
Subject Re: Redundant syscache access in get_rel_sync_entry()
Date
Msg-id tencent_31FD6A9F52E66572F0300FEAECE242E30A09@qq.com
Whole thread Raw
In response to Re: Redundant syscache access in get_rel_sync_entry()  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List pgsql-hackers
------------------ Original ------------------
From: "Ashutosh Bapat" <ashutosh.bapat.oss@gmail.com>;
Date: Thu, Jul 11, 2024 09:40 PM
To: "cca5507"<cca5507@qq.com>;
Cc: "pgsql-hackers"<pgsql-hackers@lists.postgresql.org>;
Subject: Re: Redundant syscache access in get_rel_sync_entry()
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.

Agreed

Thank you for reply

--
Regards,
ChangAo Chen

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: tests fail on windows with default git settings
Next
From: Sami Imseih
Date:
Subject: Re: Restart pg_usleep when interrupted