public inbox for [email protected]
help / color / mirror / Atom feedFrom: Greg Sabino Mullane <[email protected]>
To: Bertrand Drouvot <[email protected]>
Cc: [email protected]
Subject: Re: Adding locks statistics
Date: Tue, 12 Aug 2025 08:54:07 -0400
Message-ID: <CAKAnmmJ+WW8=28dvQGvPvGh1APh0FxDbdTkdahoatN35y2cgxw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<CAKAnmm+USTr5MeKuyrAvbCjHqbSFbZ+czJsV7fPYt9nECQkf-A@mail.gmail.com>
<[email protected]>
On Tue, Aug 12, 2025 at 5:32 AM Bertrand Drouvot <
[email protected]> wrote:
> I considered pg_stat_locks, but chose the singular form to be consistent
> with
> pg_stat_database, pg_stat_subscription, and friends.
>
Counter-examples: pg_stat_statements, pg_stat_subscription_stats. Our names
are not consistent. :) It just feels a better fit to have a plural name for
a table tracking aggregates of multiple types of objects.
(Ignore my git complaint, was obviously half-asleep when I wrote that).
> 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.
> Because it looks like that they are ordered by alphabetical order.
>
That makes sense.
> - I'm not sure that's worth for this particular case and code paths.
>
Will let others opine on that.
Thanks! Did you observe some noticeable performance penalties?
>
No, but I did not give it any particularly heavy testing. More of a idle
thought when pulling up a brand new system and seeing the thousands of
locks for the tiniest bit of database action.
Cheers,
Greg
--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support
view thread (43+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Adding locks statistics
In-Reply-To: <CAKAnmmJ+WW8=28dvQGvPvGh1APh0FxDbdTkdahoatN35y2cgxw@mail.gmail.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