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: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Rahila Syed <rahilasyed90@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Improve LWLock tranche name visibility across backends
Date: Mon, 25 Aug 2025 16:44:55 -0500
Message-ID: <aKzZV8Acib6pFesE@nathan> (raw)
In-Reply-To: <CAA5RZ0vh7jrGDwJgkKtw-LR5fBH-tRNpGJnPivdKedtqJ7HGCQ@mail.gmail.com>
References: <5to6tftuml6nkas4jaaljfzecasvslxq3mumeslh74wsol4mzw@rgxpxxlqqwtf>
	<aKTGF9Fv1ioXa9P5@nathan>
	<876523.1755635201@sss.pgh.pa.us>
	<CAA5RZ0sbo-HAOrTGVoqP3giXKDV_LXL0UGaYs8mfjcS33mn3FQ@mail.gmail.com>
	<aKTlu7mHhx4owx6r@nathan>
	<CAA5RZ0tg0-O3KVrP9UrZWm18OECxK87WNJo=cZy=Gevc+Ui5oA@mail.gmail.com>
	<aKTqiofwo1Eif_3w@nathan>
	<CAA5RZ0tKoQeTuRsFmUjPAOEXBiyEGyePsqCAy-_oX4eFHSCmHw@mail.gmail.com>
	<aKzP-H-KzPay-ByM@nathan>
	<CAA5RZ0vh7jrGDwJgkKtw-LR5fBH-tRNpGJnPivdKedtqJ7HGCQ@mail.gmail.com>

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





view thread (107+ messages)  latest in thread

Message-ID: <aKzZV8Acib6pFesE@nathan>
Permalink:  ../aKzZV8Acib6pFesE@nathan/
Also on:    postgresql.org/message-id/aKzZV8Acib6pFesE@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, tgl@sss.pgh.pa.us, andres@anarazel.de, bertranddrouvot.pg@gmail.com, rahilasyed90@gmail.com
  Subject: Re: Improve LWLock tranche name visibility across backends
  In-Reply-To: <aKzZV8Acib6pFesE@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