test_dsa: Avoid leaking LWLock tranches.
Nathan Bossart <nathan@postgresql.org>
test_dsa: Avoid leaking LWLock tranches. Since this is a test module, leaking a couple of LWLock tranches is fine, but we want to discourage that pattern in third-party code. This commit teaches the module to create only one tranche and to store its ID in shared memory for use by other backends. Reported-by: Alexander Lakhin <exclusion@gmail.com> Reviewed-by: Sami Imseih <samimseih@gmail.com> Discussion: https://postgr.es/m/dd36d384-55df-4fc2-825c-5bc56c950fa9%40gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/test/modules/test_dsa/test_dsa.c | modified | +19 −8 |
Discussion
- Improve LWLock tranche name visibility across backends 107 messages · 2025-07-09 → 2025-11-12