| From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
|---|---|
| To: | "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Avoid double lookup in pgstat_fetch_stat_tabentry() |
| Date: | 2022-11-18 11:38:28 |
| Message-ID: | CALj2ACW4t3=aaobZT-NLh04DEKBFWOY1ET3u8JxGsFgW9hUv5A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Nov 18, 2022 at 3:41 PM Drouvot, Bertrand
<bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
>
> > However, I have a suggestion to simplify it
> > further by getting rid of the local variable tabentry and just
> > returning pgstat_fetch_stat_tabentry_ext(IsSharedRelation(relid),
> > relid);. Furthermore, the pgstat_fetch_stat_tabentry() can just be a
> > static inline function.
> Good point. While at it, why not completely get rid of
> pgstat_fetch_stat_tabentry_ext(), like in v2 the attached?
Hm. While it saves around 20 LOC, IsSharedRelation() is now spread
across, but WFM.
--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Etsuro Fujita | 2022-11-18 11:46:59 | Re: postgres_fdw: batch inserts vs. before row triggers |
| Previous Message | Drouvot, Bertrand | 2022-11-18 11:18:38 | Re: Split index and table statistics into different types of stats |