You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PGReserveSemaphores() called from CreateSharedMemoryAndSemaphores()
Before e256266, PGReserveSemaphores()
was required to be called before SpinlockSemaInit() since spinlocks may
be implemented using semaphores on some platforms. SpinlockSemaInit()
was required to be called before InitShmemAllocation() since the latter
initialized a spinlock to synchronize shared memory allocations.
e256266 removed the call to
SpinlockSemaInit() from CreateSharedMemoryAndSemaphores() but left the
call to PGReserveSemaphores() in CreateSharedMemoryAndSemaphores(), even
though it fits in CreateOrAttachShmemStructs() along with the calls to
other functions allocating shared memory structures. Add a comment
explaining this absurdity.
To be backpatched to PG 18.
Author: Ashutosh Bapat <[email protected]>
Discussion: https://www.postgresql.org/message-id/CAExHW5seSZpPx-znjidVZNzdagGHOk06F+Ds88MpPUbxd1kTaA@mail.gmail.com
0 commit comments