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

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: 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-21 20:28:14
Message-ID: aH6i3iCHaeZ6e1vr@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 21, 2025 at 03:20:55PM -0500, Nathan Bossart wrote:
> On Fri, Jul 18, 2025 at 01:39:15PM +0000, Bertrand Drouvot wrote:
>> +#define PG_BUILTIN_LWTRANCHE(id, name) [id] = name,
>> +#include "storage/lwlocktranchelist.h"
>> +#undef PG_BUILTIN_LWTRANCHE
>
> Why not reuse PG_LWLOCK for this?
>
>> + # Stop recording if we reach another section.
>> + last if /^Section:/;
>
> 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?

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2025-07-21 20:29:56 Re: [PATCH] Proposal to Enable/Disable Index using ALTER INDEX
Previous Message Vik Fearing 2025-07-21 20:26:51 Re: Proposal: QUALIFY clause