| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | "Michael Paquier" <michael(at)paquier(dot)xyz>, "Bertrand Drouvot" <bertranddrouvot(dot)pg(at)gmail(dot)com> |
| Cc: | "Andres Freund" <andres(at)anarazel(dot)de>, "Jeff Davis" <pgsql(at)j-davis(dot)com>, "Greg Sabino Mullane" <htamfids(at)gmail(dot)com>, "L(dot) pgsql-hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Adding locks statistics |
| Date: | 2026-03-21 20:01:02 |
| Message-ID: | e38089eb-3619-4434-b888-397175c4eaa9@app.fastmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2026-03-21, Michael Paquier wrote:
> On Thu, Mar 19, 2026 at 12:25:41PM +0000, Bertrand Drouvot wrote:
>> 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.
I checked this, and found a couple of headers that can benefit from a removal, as shown in the attached patches.
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.
--
Álvaro Herrera
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-procarray.h-does-not-need-storage-lock.h-for-anythin.patch | text/x-patch | 741 bytes |
| 0002-lmgr.h-doesn-t-need-the-full-lock.h.patch | text/x-patch | 1.7 KB |
| 0003-namespace.h-doesn-t-need-lock.h-only-lockdefs.h.patch | text/x-patch | 2.9 KB |
| 0004-vacuum.h-doesn-t-need-lock.h.patch | text/x-patch | 1.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Gustafsson | 2026-03-21 20:11:09 | Re: Proposal: Implementing Botan as an alternative TLS backend for PostgreSQL |
| Previous Message | Andres Freund | 2026-03-21 19:54:40 | Re: index prefetching |