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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 91ecb5e) | patch
Make FP_LOCK_SLOTS_PER_BACKEND look like a function
Tue, 4 Mar 2025 17:33:09 +0000 (18:33 +0100)
Tue, 4 Mar 2025 17:33:12 +0000 (18:33 +0100)
commit c878de1db438f9f4747374c286d4319cc527eec2
Make FP_LOCK_SLOTS_PER_BACKEND look like a function

The FP_LOCK_SLOTS_PER_BACKEND macro looks like a constant, but it
depends on the max_locks_per_transaction GUC, and thus can change. This
is non-obvious and confusing, so make it look more like a function by
renaming it to FastPathLockSlotsPerBackend().

While at it, use the macro when initializing fast-path shared memory,
instead of using the formula.

Reported-by: Andres Freund
Discussion: https://postgr.es/m/ffiwtzc6vedo6wb4gbwelon5nefqg675t5c7an2ta7pcz646cg%40qwmkdb3l4ett
src/backend/storage/lmgr/lock.c diff | blob | blame | history
src/backend/storage/lmgr/proc.c diff | blob | blame | history
src/backend/utils/init/postinit.c diff | blob | blame | history
src/include/storage/proc.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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