pgsql: Prepare DSM registry for upcoming changes to LWLock tranche name

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Prepare DSM registry for upcoming changes to LWLock tranche name
Date: 2025-08-30 01:35:19
Message-ID: E1usAUx-002JTN-0l@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Prepare DSM registry for upcoming changes to LWLock tranche names.

A proposed patch would place a limit of NAMEDATALEN-1 (i.e., 63)
bytes on the names of dynamically-allocated LWLock tranches, but
GetNamedDSA() and GetNamedDSHash() may register tranches with
longer names. This commit lowers the maximum DSM registry entry
name length to NAMEDATALEN-1 bytes and modifies GetNamedDSHash() to
create only one tranche, thereby allowing us to keep the DSM
registry's tranche names below NAMEDATALEN bytes.

Author: Sami Imseih <samimseih(at)gmail(dot)com>
Discussion: https://postgr.es/m/aKzIg1JryN1qhNuy%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5487058b56e0a27b6b8f6bb7e819f107587c1e54

Modified Files
--------------
src/backend/storage/ipc/dsm_registry.c | 57 ++++++++++++----------------------
1 file changed, 19 insertions(+), 38 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2025-08-30 21:52:32 pgsql: doc PG 18 relnotes: add attribution and rewrite text search item
Previous Message Bruce Momjian 2025-08-29 19:55:13 pgsql: doc PG 18 relnotes: update to current