agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Drouvot, Bertrand <bdrouvot@amazon.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: andres@anarazel.de
Cc: stark@mit.edu
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: shared-memory based stats collector - v70
Date: Wed, 10 Aug 2022 14:02:34 +0200
Message-ID: <3d853c6f-445f-782e-eab0-525729952d4c@amazon.com> (raw)
In-Reply-To: <20220810.113910.92411510444435201.horikyota.ntt@gmail.com>
References: <CAM-w4HMYkM_DkYhWtUGV+qE_rrBxKOzOF0+5faozxO3vXrc9wA@mail.gmail.com>
	<20220809.172435.775392169163486535.horikyota.ntt@gmail.com>
	<20220809165319.jdzd225xohqf6o57@awork3.anarazel.de>
	<20220810.113910.92411510444435201.horikyota.ntt@gmail.com>

Hi,

On 8/10/22 4:39 AM, Kyotaro Horiguchi wrote:
> At Tue, 9 Aug 2022 09:53:19 -0700, Andres Freund <andres@anarazel.de> wrote in
>> Could you try the pgstat_lock_entry_shared() approach?
> Of course. Please find the attached.

Thanks for the patch!

It looks good to me.

One nit comment though, instead of:

+               /*
+                * Take lwlock directly instead of using 
pg_stat_lock_entry_shared()
+                * which requires a reference.
+                */

what about?

+               /*
+                * Acquire the LWLock directly instead of using 
pg_stat_lock_entry_shared()
+                * which requires a reference.
+                */


I think that's more consistent with other comments mentioning LWLock 
acquisition.

Regards,

-- 
Bertrand Drouvot
Amazon Web Services: https://aws.amazon.com






view thread (93+ messages)  latest in thread

Message-ID: <3d853c6f-445f-782e-eab0-525729952d4c@amazon.com>
Permalink:  ../3d853c6f-445f-782e-eab0-525729952d4c@amazon.com/
Also on:    postgresql.org/message-id/3d853c6f-445f-782e-eab0-525729952d4c@amazon.com

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: bdrouvot@amazon.com, horikyota.ntt@gmail.com, andres@anarazel.de, stark@mit.edu, pgsql-hackers@lists.postgresql.org
  Subject: Re: shared-memory based stats collector - v70
  In-Reply-To: <3d853c6f-445f-782e-eab0-525729952d4c@amazon.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox