Re: Adding locks statistics - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Adding locks statistics
Date
Msg-id ab4y1UQUsSS7bSVd@paquier.xyz
Whole thread Raw
In response to Re: Adding locks statistics  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Adding locks statistics
List 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

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: remove bits* types
Next
From: Michael Paquier
Date:
Subject: Re: basebackup: add missing deflateEnd() in gzip compression sink