]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Calculate # of semaphores correctly with --disable-spinlocks.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 4 Apr 2013 13:31:44 +0000 (16:31 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 4 Apr 2013 13:38:34 +0000 (16:38 +0300)
commiteb1656b813435127f06df57f2202d2abc387ee88
treea92ed59011c2a842db179e3c33e3db7a64f625d9
parenta941e89a385c16d5b22f90ad61a103001e2a9faf
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.
src/backend/storage/lmgr/spin.c