Re: Avoid double lookup in pgstat_fetch_stat_tabentry() - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Avoid double lookup in pgstat_fetch_stat_tabentry()
Date
Msg-id 20221118173210.36kduimzuqnxcjjd@awork3.anarazel.de
Whole thread Raw
In response to Re: Avoid double lookup in pgstat_fetch_stat_tabentry()  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Responses Re: Avoid double lookup in pgstat_fetch_stat_tabentry()
List pgsql-hackers
Hi,

On 2022-11-18 11:09:43 +0100, Drouvot, Bertrand wrote:
> > Furthermore, the pgstat_fetch_stat_tabentry() can just be a
> > static inline function.

I think that's just premature optimization for something like this. The
function call overhead on accessing stats can't be a relevant factor - the
increase in code size is more likely to matter (but still unlikely).


> Good point. While at it, why not completely get rid of
> pgstat_fetch_stat_tabentry_ext(), like in v2 the attached?

-1, I don't think spreading the IsSharedRelation() is a good idea. It costs
more code than it saves.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: predefined role(s) for VACUUM and ANALYZE
Next
From: Robert Haas
Date:
Subject: Re: allowing for control over SET ROLE