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

From Bertrand Drouvot
Subject Re: Verify predefined LWLocks tranches have entries in wait_event_names.txt
Date
Msg-id aIB/mN3x9finhu5E@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Verify predefined LWLocks tranches have entries in wait_event_names.txt  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Verify predefined LWLocks tranches have entries in wait_event_names.txt
List pgsql-hackers
Hi,

On Wed, Jul 23, 2025 at 12:23:37PM +0900, Michael Paquier wrote:
> 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.

Yeah, but OTOH we avoid the addition of a new file and we avoid changing some
meson and make files. Also the distinction is still clear as we are using a new
macro name. So that's fine by me.

> > Thoughts?

I noticed that you removed the LWTRANCHE_ prefix in lwlocklist.h, while I agree
that's not needed, that could be misleading for people that grep for things like
"LWTRANCHE_XACT_BUFFER" for example. I don't think that's a big deal though.

Also, I think we don't need to read lwlocklist.h twice in generate-lwlocknames.pl.

PFA v4 where the only change compared to v3 is that it reads lwlocklist.h once
in generate-lwlocknames.pl.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment

pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: stats.sql might fail due to shared buffers also used by parallel tests
Next
From: Amit Kapila
Date:
Subject: Re: 024_add_drop_pub.pl might fail due to deadlock