postgresql/src/include
Robert Haas daa7527afc Reduce the number of semaphores used under --disable-spinlocks.
Instead of allocating a semaphore from the operating system for every
spinlock, allocate a fixed number of semaphores (by default, 1024)
from the operating system and multiplex all the spinlocks that get
created onto them.  This could self-deadlock if a process attempted
to acquire more than one spinlock at a time, but since processes
aren't supposed to execute anything other than short stretches of
straight-line code while holding a spinlock, that shouldn't happen.

One motivation for this change is that, with the introduction of
dynamic shared memory, it may be desirable to create spinlocks that
last for less than the lifetime of the server.  Without this change,
attempting to use such facilities under --disable-spinlocks would
quickly exhaust any supply of available semaphores.  Quite apart
from that, it's desirable to contain the quantity of semaphores
needed to run the server simply on convenience grounds, since using
too many may make it harder to get PostgreSQL running on a new
platform, which is mostly the point of --disable-spinlocks in the
first place.

Patch by me; review by Tom Lane.
2014-01-08 18:58:00 -05:00
..
access Update copyright for 2014 2014-01-07 16:05:30 -05:00
bootstrap Update copyright for 2014 2014-01-07 16:05:30 -05:00
catalog Update copyright for 2014 2014-01-07 16:05:30 -05:00
commands Update copyright for 2014 2014-01-07 16:05:30 -05:00
common Update copyright for 2014 2014-01-07 16:05:30 -05:00
datatype Update copyright for 2014 2014-01-07 16:05:30 -05:00
executor Update copyright for 2014 2014-01-07 16:05:30 -05:00
foreign Update copyright for 2014 2014-01-07 16:05:30 -05:00
lib Update copyright for 2014 2014-01-07 16:05:30 -05:00
libpq Update copyright for 2014 2014-01-07 16:05:30 -05:00
mb Update copyright for 2014 2014-01-07 16:05:30 -05:00
nodes Update copyright for 2014 2014-01-07 16:05:30 -05:00
optimizer Update copyright for 2014 2014-01-07 16:05:30 -05:00
parser Update copyright for 2014 2014-01-07 16:05:30 -05:00
port Get rid of use of asprintf() in favor of a more portable implementation. 2013-10-22 18:42:13 -04:00
portability Update copyright for 2014 2014-01-07 16:05:30 -05:00
postmaster Update copyright for 2014 2014-01-07 16:05:30 -05:00
regex Update copyright for 2014 2014-01-07 16:05:30 -05:00
replication Update copyright for 2014 2014-01-07 16:05:30 -05:00
rewrite Update copyright for 2014 2014-01-07 16:05:30 -05:00
snowball Update copyright for 2014 2014-01-07 16:05:30 -05:00
storage Reduce the number of semaphores used under --disable-spinlocks. 2014-01-08 18:58:00 -05:00
tcop Update copyright for 2014 2014-01-07 16:05:30 -05:00
tsearch Update copyright for 2014 2014-01-07 16:05:30 -05:00
utils Update copyright for 2014 2014-01-07 16:05:30 -05:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
fmgr.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
funcapi.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
getaddrinfo.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
getopt_long.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
Makefile Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
miscadmin.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Reduce the number of semaphores used under --disable-spinlocks. 2014-01-08 18:58:00 -05:00
pg_config.h.in Undo autoconf 2.69's attempt to #define _DARWIN_USE_64_BIT_INODE. 2013-12-29 12:57:56 -05:00
pg_config.h.win32 Remove use of obsolescent Autoconf macros 2013-11-30 09:17:08 -05:00
pg_trace.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pgstat.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pgtar.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pgtime.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
port.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
postgres_ext.h Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
postgres_fe.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
postgres.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
rusagestub.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
windowapi.h Update copyright for 2014 2014-01-07 16:05:30 -05:00