Add comment to explain why PGReserveSemaphores() is called early

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 75ec47c38bcf8777164cf91885eb907eb3fc369b
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2025-11-06T12:20:58Z
Releases: 18.1
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 <ashutosh.bapat.oss@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAExHW5seSZpPx-znjidVZNzdagGHOk06F+Ds88MpPUbxd1kTaA@mail.gmail.com
Backpatch-to: 18

Files

PathChange+/−
src/backend/storage/ipc/ipci.c modified +3 −1

Discussion