diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-26 00:32:46 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-26 00:32:46 +0000 |
commit | 93407d3998cc8717993dbc102f854a478985bc19 (patch) | |
tree | dd49afb76b3506f188bac2ab628225b44c5178a1 /src | |
parent | f828f878e96b83cc50569305e2f2eccfde1e8181 (diff) | |
download | postgresql-93407d3998cc8717993dbc102f854a478985bc19.tar.gz postgresql-93407d3998cc8717993dbc102f854a478985bc19.zip |
Use SYSV semaphores rather than POSIX on Darwin >= 6.0 (i.e., OS X 10.2
and up), per Chris Marcellino. This avoids consuming O(N^2) file
descriptors to support N backends. Tests suggest it's about a wash for
small installations, but large ones would have a problem.
Diffstat (limited to 'src')
-rw-r--r-- | src/template/darwin | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/template/darwin b/src/template/darwin index cb9afb20f3b..b017530a871 100644 --- a/src/template/darwin +++ b/src/template/darwin @@ -1,8 +1,18 @@ -# $PostgreSQL: pgsql/src/template/darwin,v 1.10 2006/03/11 04:38:40 momjian Exp $ +# $PostgreSQL: pgsql/src/template/darwin,v 1.11 2007/09/26 00:32:46 tgl Exp $ # Apple's cpp-precomp seems a tad broken, so don't use it # (Note: on OS X before 10.2, you might need -traditional-cpp instead) CC="$CC -no-cpp-precomp" -# Select appropriate semaphore support -USE_NAMED_POSIX_SEMAPHORES=1 +# Select appropriate semaphore support. Darwin 6.0 (Mac OS X 10.2) and up +# support System V semaphores; before that we have to use POSIX semaphores, +# which are less good for our purposes because they eat a file descriptor +# per backend per max_connection slot. +case $host_os in + darwin[015].*) + USE_NAMED_POSIX_SEMAPHORES=1 + ;; + *) + USE_SYSV_SEMAPHORES=1 + ;; +esac |