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 aLmzwC2dRbqk14y6@nathan
Whole thread Raw
In response to Re: Improve LWLock tranche name visibility across backends  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Improve LWLock tranche name visibility across backends
List pgsql-hackers
On Wed, Sep 03, 2025 at 02:01:14PM -0500, Nathan Bossart wrote:
> Committed.

I'm having some regrets about the changes to RequestNamedLWLockTranche().
Specifically, when it is first called, it immediately allocates an array
big enough to hold 256 requests (~17 KB), whereas it used to only allocate
space for 16 requests (~1 KB) and resize as needed.  Furthermore, the
MAX_NAMED_TRANCHES check isn't actually needed because InitializeLWLocks()
will do the same check via its calls to LWLockNewTrancheId() for all the
named tranche requests.

-- 
nathan

Attachment

pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: NOT NULL NOT ENFORCED
Next
From: Alena Rybakina
Date:
Subject: Re: Vacuum statistics