Re: Adding locks statistics
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Jeff Davis <pgsql@j-davis.com>, Greg Sabino Mullane <htamfids@gmail.com>,
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2025-08-11T23:49:45Z
Lists: pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes: > On Mon, Aug 11, 2025 at 02:53:58PM -0700, Jeff Davis wrote: >> Can you describe your use case? I'd like to understand whether this is >> useful for users, hackers, or both. > This is a DBA feature, so the questions I'd ask myself are basically: > - Is there any decision-making where these numbers would help? These > decisions would shape in tweaking the configuration of the server or > the application to as we move from a "bad" number trend to a "good" > number trend. > - What would be good numbers? In this case, most likely a threshold > reached over a certain period of time. > - Would these new stats overlap with similar statistics gathered in > the system, creating duplication and bloat in the pgstats for no real > gain? I'm also wondering why slicing the numbers in this particular way (i.e., aggregating by locktype) is a helpful way to look at the data. Maybe it's just what you want, but that's not obvious to me. regards, tom lane
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix injection point detach timing problem in TAP test for lock stats
- 3284e3f63cf0 19 (unreleased) landed
-
Use single LWLock for lock statistics in pgstats
- 404a17c155ac 19 (unreleased) landed
-
Add tests for lock statistics, take two
- 557a9f1e3e62 19 (unreleased) landed
-
Remove isolation test lock-stats
- 7c64d56fd976 19 (unreleased) landed
-
Avoid including clog.h in proc.h
- f227b7b20c36 19 (unreleased) landed
-
Don't include storage/lock.h in so many headers
- 2102ebb1953f 19 (unreleased) landed
-
Add support for lock statistics in pgstats
- 4019f725f5d4 19 (unreleased) landed
-
Move some code blocks in lock.c and proc.c
- a90d86518243 19 (unreleased) landed
-
Move declarations related to locktags from lock.h to new locktag.h
- 322bab79744d 19 (unreleased) landed