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

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Calculate # of semaphores correctly with --disable-spinlocks.
Date: 2013-04-04 13:59:48
Message-ID: E1UNkhg-00015f-8C@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6ce083f08a7a30360695c0e9a927fe24f4c77143

Modified Files
--------------
src/backend/storage/lmgr/spin.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2013-04-04 14:43:53 pgsql: Fix a few thinkos in the JSON functions docs.
Previous Message pgsql 2013-04-04 13:55:36 pgsql: Tag refs/tags/REL9_2_4 was created