Re: Improve LWLock tranche name visibility across backends
Sami Imseih <samimseih@gmail.com>
From: Sami Imseih <samimseih@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, Bertrand Drouvot <bertranddrouvot.pg@gmail.com>,
Rahila Syed <rahilasyed90@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-08-26T22:50:34Z
Lists: pgsql-hackers
Attachments
- v13-0002-Tests-for-LWLock-tranche-registration-improvemen.patch (application/octet-stream) patch v13-0002
- v13-0001-Improve-LWLock-tranche-registration.patch (application/octet-stream) patch v13-0001
- v13-0003-Remove-the-DSA-suffix-for-tranches-created-with-.patch (application/octet-stream) patch v13-0003
fixed the issues mentioned above in v13. > We probably need to do the sprintf/strcpy before LWLockNewTrancheId(). > Also, I'm thinking we should just use the same tranche for both the DSA and > the dshash table [0] to evade the DSMR_DSA_TRANCHE_SUFFIX problem, i.e., > those tranche names potentially require more space. v13 also includes a separate patch for this. It removes the DSMR_DSA_TRANCHE_SUFFIX, and dsh and dsa now use the same user defined tranche. The tranche name is also limited to the max length of a named tranche, MAX_NAMED_TRANCHES_NAME_LEN, coming from lwlock.h -- Sami
Commits
-
test_dsa: Avoid leaking LWLock tranches.
- c5c74282f2ea 19 (unreleased) landed
-
Teach DSM registry to ERROR if attaching to an uninitialized entry.
- b26d76f64327 18.2 landed
- ac2800ddc185 17.8 landed
- 1165a933aab1 19 (unreleased) landed
-
Add a test harness for the LWLock tranche code.
- 16607718c010 19 (unreleased) landed
-
Revert recent change to RequestNamedLWLockTranche().
- d814d7fc3d52 19 (unreleased) landed
-
Move dynamically-allocated LWLock tranche names to shared memory.
- 38b602b0289f 19 (unreleased) landed
-
Prepare DSM registry for upcoming changes to LWLock tranche names.
- 5487058b56e0 19 (unreleased) landed
-
Add GetNamedDSA() and GetNamedDSHash().
- fe07100e82b0 19 (unreleased) cited