Re: Verify predefined LWLocks tranches have entries in wait_event_names.txt - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Verify predefined LWLocks tranches have entries in wait_event_names.txt
Date
Msg-id aH7HHCsa2eoDozIg@paquier.xyz
Whole thread Raw
In response to Re: Verify predefined LWLocks tranches have entries in wait_event_names.txt  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Verify predefined LWLocks tranches have entries in wait_event_names.txt
List pgsql-hackers
On Mon, Jul 21, 2025 at 03:28:14PM -0500, Nathan Bossart wrote:
> On Mon, Jul 21, 2025 at 03:20:55PM -0500, Nathan Bossart wrote:
>> Can we add a note to wait_event_names.txt about the required
>> ordering/matching of the non-predefined LWLocks?  Otherwise, these patches
>> look pretty good to me.
>
> Something else I just thought of: could we remove the list of built-in
> tranches in lwlock.h with some macro magic that generates it from
> lwlocktranchelist.h, too?

Ah, you mean removing the need to have to maintain BuiltinTrancheIds.
This structure depends on NUM_INDIVIDUAL_LWLOCKS for the start value.
Not really an objection per-se, but trying to automate everything may
impact the readability of this area of the code.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposal: QUALIFY clause
Next
From: Michael Paquier
Date:
Subject: Re: track generic and custom plans in pg_stat_statements