git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: f047814) | patch
Revert recent change to RequestNamedLWLockTranche().
Thu, 4 Sep 2025 20:34:48 +0000 (15:34 -0500)
Thu, 4 Sep 2025 20:34:48 +0000 (15:34 -0500)
commit d814d7fc3d5257ae258b502229fc7ca97c97270a
Revert recent change to RequestNamedLWLockTranche().

Commit 38b602b028 modified this function to allocate enough space
for MAX_NAMED_TRANCHES (256) requests, which is likely far more
than most clusters need. This commit reverts that change so that
it first allocates enough space for only 16 requests and resizes
the array when necessary. While at it, remove the check for too
many tranches from this function. We can now rely on
InitializeLWLocks() to do that check via its calls to
LWLockNewTrancheId() for the named tranches.

Reviewed-by: Sami Imseih <samimseih@gmail.com>
Discussion: https://postgr.es/m/aLmzwC2dRbqk14y6%40nathan
src/backend/storage/lmgr/lwlock.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /