Re: shared-memory based stats collector - v70 - Mailing list pgsql-hackers

From Drouvot, Bertrand
Subject Re: shared-memory based stats collector - v70
Date
Msg-id 3d853c6f-445f-782e-eab0-525729952d4c@amazon.com
Whole thread Raw
In response to Re: shared-memory based stats collector - v70  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: shared-memory based stats collector - v70
List pgsql-hackers
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




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Typo in misc_sanity.sql?
Next
From: "osumi.takamichi@fujitsu.com"
Date:
Subject: RE: logical replication restrictions