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 aIBVuScop3uVGThI@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 Tue, Jul 22, 2025 at 02:25:13PM -0500, Nathan Bossart wrote:
> I stared at this patch some more and came up with the attached.  The
> biggest change is that I've moved the list of built-in LWLock tranches to
> the existing lwlocklist.h file.  That simplifies the patch and centralizes
> these lists.  This is arguably a bit too much preprocessor magic, though.
> Thoughts?

With the argument about checking the consistency of the data between
wait_event_names.txt, that looks like an improvement to me.  And as
far as I can see, the check you are adding in generate-lwlocknames.pl
also makes sure that the ordering of the entries is correct.

In short, I side with the argument that this extra magic will save
cycles overall.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: track generic and custom plans in pg_stat_statements
Next
From: vignesh C
Date:
Subject: Re: Log prefix missing for subscriber log messages received from publisher