pgsql: Avoid calls to RelationGetRelationName() and RelationGetNamespac

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid calls to RelationGetRelationName() and RelationGetNamespac
Date: 2020-03-31 04:19:25
Message-ID: E1jJ8N3-0006bg-L5@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2020-03-31 06:30:27 pgsql: Update SQL features
Previous Message Tom Lane 2020-03-31 02:54:58 Re: pgsql: Attempt to fix unstable regression tests, take 2