pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pgstat: replace double lookup with IsSharedRelation()
Date: Sun, 20 Nov 2022 19:00:13 +0000
Message-ID: <E1owpY4-00074a-Mt@gemulon.postgresql.org> (raw)

pgstat: replace double lookup with IsSharedRelation()

As the list of shared relations is fixed, we can just dispatch based
IsSharedRelation(), instead of first trying to look up stats for a non-shared
rel and falling back to shared stats.

Author: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de
Discussion: https://postgr.es/m/8c1851a2-a98e-e1bc-7729-37b0b95f66ec@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/061bf98fb8f468b9a8c9fb617bb30136db1cc812

Modified Files
--------------
src/backend/utils/activity/pgstat_relation.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)



Message-ID: <E1owpY4-00074a-Mt@gemulon.postgresql.org>
Permalink:  ../E1owpY4-00074a-Mt@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1owpY4-00074a-Mt@gemulon.postgresql.org

 · 

reply

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: andres@anarazel.de
  Subject: Re: pgsql: pgstat: replace double lookup with IsSharedRelation()
  In-Reply-To: <E1owpY4-00074a-Mt@gemulon.postgresql.org>
  References: <E1owpY4-00074a-Mt@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