Re: Redundant syscache access in get_rel_sync_entry()

From: cca5507 <cca5507(at)qq(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Redundant syscache access in get_rel_sync_entry()
Date: 2024-07-11 14:09:13
Message-ID: tencent_31FD6A9F52E66572F0300FEAECE242E30A09@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

------------------&nbsp;Original&nbsp;------------------
From: "Ashutosh Bapat" <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com&gt;;
Date:&nbsp;Thu, Jul 11, 2024 09:40 PM
To:&nbsp;"cca5507"<cca5507(at)qq(dot)com&gt;;
Cc:&nbsp;"pgsql-hackers"<pgsql-hackers(at)lists(dot)postgresql(dot)org&gt;;
Subject:&nbsp;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.&nbsp; But if there are multiple places which do something like this, we may want to create more function&nbsp;get_rel_* function which&nbsp;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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2024-07-11 15:15:41 Re: Restart pg_usleep when interrupted
Previous Message Andrew Dunstan 2024-07-11 13:56:41 Re: tests fail on windows with default git settings