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