Re: Adding locks statistics - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: Adding locks statistics
Date
Msg-id aJwEeoQvXRSZ/Gyn@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Adding locks statistics  (Greg Sabino Mullane <htamfids@gmail.com>)
List pgsql-hackers
Hi,

On Tue, Aug 12, 2025 at 08:54:07AM -0400, Greg Sabino Mullane wrote:
> On Tue, Aug 12, 2025 at 5:32 AM Bertrand Drouvot <
> bertranddrouvot.pg@gmail.com> wrote:
> 
> > Docs: seem good. Needs a section on how to reset via
> > > SELECT pg_stat_reset_shared('lock');
> >
> 
> I meant something closer to the actual description of the view.  Having it
> buried in the pg_stat_reset_shared section is not intuitive for people
> looking up the view in the docs.

I agree that we could add this extra information in the view documentation.

But none of pg_stat_archiver, pg_stat_bgwriter, pg_stat_checkpointer, pg_stat_io,
pg_stat_slru and pg_stat_wal have done so. The only exception is pg_stat_recovery_prefetch
and for a good reason as not all of its fields are reset. 

While I think that's probably a good idea, I think it's worth a dedicated
thread (so that the discussion takes into account the other views mentioned
above).

Regards,

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



pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Pathify RHS unique-ification for semijoin planning
Next
From: SATYANARAYANA NARLAPURAM
Date:
Subject: Proposal: GUC to control starting/stopping logical subscription workers