Re: GetNamedLWLockTranche crashes on Windows in normal backend

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GetNamedLWLockTranche crashes on Windows in normal backend
Date: 2025-09-08 18:24:32
Message-ID: aL8fYNxLg_AFOwaZ@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 08, 2025 at 11:55:14AM -0500, Nathan Bossart wrote:
> I've started preparing this for commit, and I realized that restricting
> GetNamedLWLockTranche() to shmem_startup_hook is not sufficient.
> EXEC_BACKEND builds will run this hook in every backend, so unless it's
> guarded behind some sort of "if (!found)" condition (i.e., only run in the
> postmaster), it'll still crash. I think we just need to add some extra
> notes to the docs and check for !IsUnderPostmaster, as discussed upthread.

Or... what if we just moved the request array to shared memory?

--
nathan

Attachment Content-Type Size
v3-0001-Move-named-LWLock-tranche-request-array-to-shared.patch text/plain 4.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2025-09-08 18:29:22 Re: [PG19-3 PATCH] Don't ignore passfile
Previous Message Burd, Greg 2025-09-08 18:21:28 Re: [PATCH] Add tests for Bitmapset