From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid calls to RelationGetRelationName() and RelationGetNamespac
Date: Tue, 31 Mar 2020 04:19:25 +0000
Message-ID: <E1jJ8N3-0006bg-L5@gemulon.postgresql.org> (raw)
Avoid calls to RelationGetRelationName() and RelationGetNamespace() in
vacuum code.
After commit b61d161c14, during vacuum, we cache the information of
relation name and relation namespace in local structure LVRelStats so that
we can use it in an error callback function. We can use the cached
information to avoid the calls to RelationGetRelationName(),
RelationGetNamespace() and get_namespace_name(). This is mainly for the
consistent in vacuum code path but it will avoid the extra syscache lookup
we do in get_namespace_name().
Author: Justin Pryzby
Reviewed-by: Amit Kapila
Discussion: https://www.postgresql.org/message-id/20191120210600.GC30362@telsasoft.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ef75140fe756e6460524b067e063beac109853ec
Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: akapila@postgresql.org
Subject: Re: pgsql: Avoid calls to RelationGetRelationName() and RelationGetNamespac
In-Reply-To: <E1jJ8N3-0006bg-L5@gemulon.postgresql.org>
References: <E1jJ8N3-0006bg-L5@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox