Re: Adding locks statistics
Álvaro Herrera <alvherre@kurilemu.de>
From: Álvaro Herrera <alvherre@kurilemu.de>
To: Michael Paquier <michael@paquier.xyz>, Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Jeff Davis <pgsql@j-davis.com>, Greg Sabino Mullane <htamfids@gmail.com>,
"L. pgsql-hackers" <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-22T19:37:47Z
Lists: pgsql-hackers
Attachments
On 2026-Mar-21, Álvaro Herrera wrote: > I checked this, and found a couple of headers that can benefit from a > removal, as shown in the attached patches. I looked again and found some more; the first 14 patches attached here do so. A couple of them have no fallout to speak of, which I find really surprising; for the majority we just need a couple of extra includes somewhere or a typedef or two. I unleashed CI on it to see what would happen, https://cirrus-ci.com/build/5522804717649920 The 15th one removes the inclusion of clog.h in proc.h. Not really related to this thread, but I noticed while looking at proc.h for removal of lock.h. > A special case (not modified here) is proc.h. It seems to me that > lock.h _could_ be removed from there with some effort, but the amount > of .c files that would benefit seems to me not large enough to justify > the number of contortions needed. Others could disagree though. I looked at it again while doing the above and came to the same conclusion. In order to make it work we'd need half a dozen typedefs, and it doesn't really look very pretty. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ Syntax error: function hell() needs an argument. Please choose what hell you want to involve.
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