Re: Improve LWLock tranche name visibility across backends - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Improve LWLock tranche name visibility across backends
Date
Msg-id aKzZV8Acib6pFesE@nathan
Whole thread Raw
In response to Re: Improve LWLock tranche name visibility across backends  (Sami Imseih <samimseih@gmail.com>)
Responses Re: Improve LWLock tranche name visibility across backends
List pgsql-hackers
On Mon, Aug 25, 2025 at 04:37:21PM -0500, Sami Imseih wrote:
> When we lookup from shared array only, we need to take a shared lock
> every lookup. Acquiring that lock is what I am trying to avoid. You
> are saying it's not worth optimizing that part, correct?

Why do we need a shared lock here?  IIUC there's no chance that existing
entries will change.  We'll only ever add new ones to the end.

-- 
nathan



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: GetNamedLWLockTranche crashes on Windows in normal backend
Next
From: Sami Imseih
Date:
Subject: Re: Improve LWLock tranche name visibility across backends