pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rename MAX_NAMED_TRANCHES to MAX_USER_DEFINED_TRANCHES
Date: Thu, 26 Mar 2026 21:46:49 +0000
Message-ID: <E1w5sXQ-001b9C-38@gemulon.postgresql.org> (raw)

Rename MAX_NAMED_TRANCHES to MAX_USER_DEFINED_TRANCHES

The "named tranches" term is a little confusing. In most places it
refers to tranches requested with RequestNamedLWLockTranche(), even
though all built-in tranches and tranches allocated with
LWLockNewTrancheId() also have a name. But in MAX_NAMED_TRANCHES, it
refers to tranches requested with either RequestNamedLWLockTranche()
or LWLockNewTrancheId(), as it's the maximum of all of those in total.

The "user defined" term is already used in
LWTRANCHE_FIRST_USER_DEFINED, so let's standardize on that to mean
tranches allocated with either RequestNamedLWLockTranche() or
LWLockNewTrancheId().

Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Sami Imseih <samimseih@gmail.com>
Discussion: https://www.postgresql.org/message-id/47aaf57e-1b7b-4e12-bda2-0316081ff50e@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cc88481aeb98326c528acb07114dd92f06de28c0

Modified Files
--------------
src/backend/storage/lmgr/lwlock.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)



Message-ID: <E1w5sXQ-001b9C-38@gemulon.postgresql.org>
Permalink:  ../E1w5sXQ-001b9C-38@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w5sXQ-001b9C-38@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Rename MAX_NAMED_TRANCHES to MAX_USER_DEFINED_TRANCHES
  In-Reply-To: <E1w5sXQ-001b9C-38@gemulon.postgresql.org>

* 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