postgresql/src/template
Tom Lane ecb0d20a9d Use unnamed POSIX semaphores, if available, on Linux and FreeBSD.
We've had support for using unnamed POSIX semaphores instead of System V
semaphores for quite some time, but it was not used by default on any
platform.  Since many systems have rather small limits on the number of
SysV semaphores allowed, it seems desirable to switch to POSIX semaphores
where they're available and don't create performance or kernel resource
problems.  Experimentation by me shows that unnamed POSIX semaphores
are at least as good as SysV semaphores on Linux, and we previously had
a report from Maksym Sobolyev that FreeBSD is significantly worse with
SysV semaphores than POSIX ones.  So adjust those two platforms to use
unnamed POSIX semaphores, if configure can find the necessary library
functions.  If this goes well, we may switch other platforms as well,
but it would be advisable to test them individually first.

It's not currently contemplated that we'd encourage users to select
a semaphore API for themselves, but anyone who wants to experiment
can add PREFERRED_SEMAPHORES=UNNAMED_POSIX (or NAMED_POSIX, or SYSV)
to their configure command line to do so.

I also tweaked configure to report which API it's selected, mainly
so that we can tell that from buildfarm reports.

I did not touch the user documentation's discussion about semaphores;
that will need some adjustment once the dust settles.

Discussion: <8536.1475704230@sss.pgh.pa.us>
2016-10-09 18:03:45 -04:00
..
aix Attempt to work around a 32bit xlc compiler bug from a different place. 2015-08-08 01:19:02 +02:00
cygwin Have configuration templates augment, not replace, LDFLAGS. 2014-06-11 19:50:57 -04:00
darwin Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
freebsd Use unnamed POSIX semaphores, if available, on Linux and FreeBSD. 2016-10-09 18:03:45 -04:00
hpux Remove duplicate specification of -Ae for HP-UX C compiler. 2015-01-13 22:52:11 -05:00
linux Use unnamed POSIX semaphores, if available, on Linux and FreeBSD. 2016-10-09 18:03:45 -04:00
netbsd Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
openbsd Remove -pipe from compiles. 2003-10-09 22:55:46 +00:00
sco Remove extra newlines at end and beginning of files, add missing newlines 2010-08-19 05:57:36 +00:00
solaris Move forgotten comment closer to where it matters. 2008-10-29 16:23:07 +00:00
unixware With the native compiler on Unixware, disable optimization if 2007-07-16 17:38:48 +00:00
win32 Have configuration templates augment, not replace, LDFLAGS. 2014-06-11 19:50:57 -04:00