summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/pseudorandomfuncs.c
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2025-09-09 14:09:36 -0500
committerNathan Bossart <nathan@postgresql.org>2025-09-09 14:09:36 -0500
commit530cfa8eb50ca5a2151dfc50a6a5999ec8aff148 (patch)
tree5169d617a6dfecafa6965211d08fd6e0b67a837c /src/backend/utils/adt/pseudorandomfuncs.c
parent81a61fde84ffc74f7b3c7854ed4193cc4d31f78b (diff)
test_slru: Fix LWLock tranche allocation in EXEC_BACKEND builds.
Currently, test_slru's shmem_startup_hook unconditionally generates new LWLock tranche IDs. This is fine on non-EXEC_BACKEND builds, where only the postmaster executes this hook, but on EXEC_BACKEND builds, every backend executes it, too. To fix, only generate the tranche IDs in the postmaster process by checking the IsUnderPostmaster variable. This is arguably a bug fix and could be back-patched, but since the damage is limited to some extra unused tranche IDs in a test module, I'm not going to bother. Reported-by: Sami Imseih <samimseih@gmail.com> Reviewed-by: Sami Imseih <samimseih@gmail.com> Discussion: https://postgr.es/m/CAA5RZ0vaAuonaf12CeDddQJu5xKL%2B6xVyS%2B_q1%2BcH%3D33JXV82w%40mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/pseudorandomfuncs.c')
0 files changed, 0 insertions, 0 deletions