Avoid double lookup in pgstat_fetch_stat_tabentry()

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Avoid double lookup in pgstat_fetch_stat_tabentry()
Date: 2022-11-18 05:01:12
Message-ID: 8c1851a2-a98e-e1bc-7729-37b0b95f66ec@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

Please find attached a patch proposal to avoid 2 calls to
pgstat_fetch_stat_tabentry_ext() in pgstat_fetch_stat_tabentry() in case
the relation is not a shared one and no statistics are found.

Thanks Andres for the suggestion done in [1].

[1]:
https://www.postgresql.org/message-id/20221116201202.3k74ajawyom2c3eq%40awork3.anarazel.de

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v1-0001-pgstat_fetch_stat_tabentry-avoid_double_lookup.patch text/plain 889 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-11-18 05:07:14 Re: Perform streaming logical transactions by background workers and parallel apply
Previous Message Masahiko Sawada 2022-11-18 05:00:59 Re: Perform streaming logical transactions by background workers and parallel apply