Re: Adding locks statistics - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: Adding locks statistics
Date
Msg-id adSd+4xRpGP2xNiS@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Adding locks statistics  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hi,

On Mon, Apr 06, 2026 at 02:11:21PM +0900, Michael Paquier wrote:
> On Tue, Mar 31, 2026 at 07:10:51AM +0000, Bertrand Drouvot wrote:
> > On Mon, Mar 30, 2026 at 06:11:17PM +0200, Tomas Vondra wrote:
> >> Isn't pgstat_lock_flush_cb a bit broken with nowait=true? It'll skip
> >> flushing stats for that particular lock type, but then it'll happily
> >> reset the pending stats anyway, forgetting the stats.
> >> 
> >> AFAIK it should keep the pending stats, and flush them sometime lager,
> >> when the lock is not contended. That's what the other flush callbacks
> >> do, at least. This probably means it needs to reset the entries one by
> >> one, not the whole struct at once.
> > 
> > Oh right, it's currently misbehaving, thanks for the warning!
> 
> I should not have missed that,

So do I...

Regards,

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



pgsql-hackers by date:

Previous
From: Bertrand Drouvot
Date:
Subject: Re: Adding locks statistics
Next
From: Bertrand Drouvot
Date:
Subject: Re: meson: Adjust test timeout for Valgrind builds