pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Sami Imseih <samimseih@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: GetNamedLWLockTranche crashes on Windows in normal backend
Date: Mon, 25 Aug 2025 14:02:26 -0500
Message-ID: <aKyzQuljgqo7-YIs@nathan> (raw)
In-Reply-To: <CAA5RZ0un+WRqsM35JUE97LOdrjGbE1VZpL0h0kaQn-_y5j8U0A@mail.gmail.com>
References: <CAA5RZ0v1_15QPg5Sqd2Qz5rh_qcsyCeHHmRDY89xVHcy2yt5BQ@mail.gmail.com>
	<aKyTa-iOdAfKynI1@nathan>
	<CAA5RZ0u4BDp4ENjOyZ7NADz+jdQY-=PZFQNsf0jBt1Va4QzoAA@mail.gmail.com>
	<aKyr_rVOtlolDcy-@nathan>
	<CAA5RZ0un+WRqsM35JUE97LOdrjGbE1VZpL0h0kaQn-_y5j8U0A@mail.gmail.com>

On Mon, Aug 25, 2025 at 01:44:22PM -0500, Sami Imseih wrote:
> Another approach is to just change GetNamedLWLockTranche to use
> NamedLWLockTrancheArray since that is already copied in EXEC_BACKEND, and
> allow GetNamedLWLockTranche to continue to be used outside of startup. In
> this case, we will need to add num_lwlocks field to
> NamedLWLockTrancheArray. This might be better to backpatch, since we will
> not be changing user facing behavior.

That seems like a reasonable thing to try.  It looks like
NamedLWLockTrancheRequests is copied, too.  Could we used that instead of
adding a new variable?

My guess is that this has been broken since this code was introduced in
commit c1772ad from 2016/v9.6, and AFAIK you are the first to report it, so
I don't feel a tremendous amount of urgency to fix it on the back-branches.

-- 
nathan





view thread (33+ messages)  latest in thread

Message-ID: <aKyzQuljgqo7-YIs@nathan>
Permalink:  ../aKyzQuljgqo7-YIs@nathan/
Also on:    postgresql.org/message-id/aKyzQuljgqo7-YIs@nathan

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, samimseih@gmail.com
  Subject: Re: GetNamedLWLockTranche crashes on Windows in normal backend
  In-Reply-To: <aKyzQuljgqo7-YIs@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox