Add comment to explain why PGReserveSemaphores() is called early
authorHeikki Linnakangas <[email protected]>
Thu, 6 Nov 2025 10:50:10 +0000 (12:50 +0200)
committerHeikki Linnakangas <[email protected]>
Thu, 6 Nov 2025 12:20:48 +0000 (14:20 +0200)
commitdaf3d99d2b8bebb3361163a11ef3d232002127c9
tree386d35c84e32bef55dbaa67bf5aeb5d13ecbb917
parent150e24501bc218057a7b9a24b19a145fa8b5c678
Add comment to explain why PGReserveSemaphores() is called early

Before commit e25626677f, PGReserveSemaphores() had to be called
before SpinlockSemaInit() because spinlocks were implemented using
semaphores on some platforms (--disable-spinlocks). Add a comment
explaining that.

Author: Ashutosh Bapat <[email protected]>
Discussion: https://www.postgresql.org/message-id/CAExHW5seSZpPx-znjidVZNzdagGHOk06F+Ds88MpPUbxd1kTaA@mail.gmail.com
Backpatch-to: 18
src/backend/storage/ipc/ipci.c