Redundant syscache access in get_rel_sync_entry()

From: cca5507 <cca5507(at)qq(dot)com>
To: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Redundant syscache access in get_rel_sync_entry()
Date: 2024-07-11 06:08:32
Message-ID: tencent_32D456A4CCC86CE3E91E58D8C987BA17B20A@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
in func&nbsp;get_rel_sync_entry() we access the same tuple in pg_class three times:
&nbsp; &nbsp; Oid &nbsp; &nbsp; &nbsp; &nbsp; schemaId = get_rel_namespace(relid);
&nbsp; &nbsp; bool am_partition = get_rel_relispartition(relid);
&nbsp; &nbsp; char relkind = get_rel_relkind(relid);
Why not just merge into one?

--
Regards,
ChangAo Chen

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2024-07-11 06:10:23 Re: relfilenode statistics
Previous Message shveta malik 2024-07-11 05:03:02 Re: Conflict detection and logging in logical replication