Re: Adding locks statistics
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Jeff Davis <pgsql@j-davis.com>, Greg Sabino Mullane <htamfids@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2026-03-21T05:55:33Z
Lists: pgsql-hackers
On Thu, Mar 19, 2026 at 12:25:41PM +0000, Bertrand Drouvot wrote: > That's a good idea! I only moved LockTagType, LOCKTAG_LAST_TYPE, LockTagTypeNames > and LOCKTAG into a new locktag.h. I chose not to move the SET_LOCKTAG_* macros > because then we'd also need to move DEFAULT_LOCKMETHOD and USER_LOCKMETHOD that > I think are better suited in lock.h. While looking at the full set of declarations, I've come to disagree to that: by moving the macros, we also do not need to know about the internal field names of LOCKTAG across multiple headers. > I did not check if there are any other files that could benefit of using > locktag.h instead of lock.h but that's something I'll do and open a dedicated > if any (once locktag.h is in the tree). I have checked after that, and did not spot an area (except your patch of course). And applied this part. > Not sure as we already have multixact-stats. Ah, right. I did not notice this one. This existing name sounds OK by me, then. -- Michael
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