postgresql/src
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
..
backend Fix incorrect handling of polymorphic aggregates used as window functions. 2016-10-09 12:49:37 -04:00
bin Fix pg_dump to work against pre-9.0 servers again. 2016-10-07 09:51:18 -04:00
common Avoid leaking FDs after an fsync failure. 2016-10-02 12:33:46 -04:00
fe_utils Teach appendShellString() to not quote strings containing "-". 2016-09-06 14:53:31 -04:00
include Fix fallback implementation of pg_atomic_write_u32(). 2016-10-07 16:55:15 -07:00
interfaces Clear OpenSSL error queue after failed X509_STORE_load_locations() call. 2016-10-07 12:51:52 +03:00
makefiles Fix typos in comments and doc 2016-01-28 16:47:36 +09:00
pl Fix misplacement of submake-generated-headers prerequisites. 2016-10-01 13:35:13 -04:00
port Include <sys/select.h> where needed 2016-09-27 01:05:21 -03:00
template Use unnamed POSIX semaphores, if available, on Linux and FreeBSD. 2016-10-09 18:03:45 -04:00
test Fix incorrect handling of polymorphic aggregates used as window functions. 2016-10-09 12:49:37 -04:00
timezone Add regression test coverage for non-default timezone abbreviation sets. 2016-09-04 20:02:16 -04:00
tools Avoid direct cross-module links in hstore_plperl and ltree_plpython, too. 2016-10-04 17:49:07 -04:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore
DEVELOPERS
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in Make TAP test suites to work, when @INC does not contain current dir. 2016-10-07 21:49:49 +03:00
Makefile.shlib Remove -Wl,-undefined,dynamic_lookup in macOS build. 2016-10-05 23:03:55 -04:00
bcc32.mak
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak