Re: Verify predefined LWLocks tranches have entries in wait_event_names.txt

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Verify predefined LWLocks tranches have entries in wait_event_names.txt
Date: 2025-07-23 06:22:16
Message-ID: aIB/mN3x9finhu5E@ip-10-97-1-34.eu-west-3.compute.internal
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
v4-0001-Cross-check-lists-of-built-in-LWLock-tranches.patch text/x-diff 15.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-07-23 06:32:25 Re: 024_add_drop_pub.pl might fail due to deadlock
Previous Message Hayato Kuroda (Fujitsu) 2025-07-23 06:15:57 RE: stats.sql might fail due to shared buffers also used by parallel tests