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-04 18:41:01
Message-ID: aLndPXAnzeCy7C3T@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 04, 2025 at 01:23:26PM -0500, Sami Imseih wrote:
> I suggest we set an in progres flag for shmem_startup_hook, as we do for
> shmem_request_hook, and error out this function if called outside of this
> hook. The error will be something like this:
>
> ```
> ERROR: cannot return the address of LWLocks outside of shmem_startup_hook
> ```
>
> We can also update the docs.
>
> If you agree with the above, I'll get the patch ready?

Yeah, I think modeling this after commit 4f2400c is a reasonable thing to
explore.

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-09-04 18:55:19 Re: index prefetching
Previous Message Tom Lane 2025-09-04 18:24:48 Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters