Calculate # of semaphores correctly with --disable-spinlocks.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: eb1656b813435127f06df57f2202d2abc387ee88
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2013-04-04T13:38:34Z
Releases: 9.0.14
Calculate # of semaphores correctly with --disable-spinlocks.

The old formula didn't take into account that each WAL sender process needs
a spinlock. We had also already exceeded the fixed number of spinlocks
reserved for misc purposes (10). Bump that to 30.

Backpatch to 9.0, where WAL senders were introduced. If I counted correctly,
9.0 had exactly 10 predefined spinlocks, and 9.1 exceeded that, but bump the
limit in 9.0 too because 10 is uncomfortably close to the edge.

Files

PathChange+/−
src/backend/storage/lmgr/spin.c modified +11 −3