Rename MAX_NAMED_TRANCHES to MAX_USER_DEFINED_TRANCHES
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Author:
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2026-03-26T21:46:04Z
Releases:
19 (unreleased)
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/lmgr/lwlock.c | modified | +13 −12 |
Discussion
- Clean up NamedLWLockTranche stuff 18 messages · 2026-03-26 → 2026-03-30