Re: Areas for Solaris support modernization - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Areas for Solaris support modernization
Date
Msg-id 881232.1772483286@sss.pgh.pa.us
Whole thread Raw
In response to Re: Areas for Solaris support modernization  ("Greg Burd" <greg@burd.me>)
Responses Re: Areas for Solaris support modernization
List pgsql-hackers
"Greg Burd" <greg@burd.me> writes:
> I've started a build/test on "icarus" with your patch applied.  I'll let you know how it goes, hopefully that won't
takeas long now. 

Cool.  Here's also a patch to switch the semaphore API.
I've tested both patches on OpenIndiana, but a confirmation
from icarus would be good.

            regards, tom lane

diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
index b4914faff1c..c1a3e5b779a 100644
--- a/doc/src/sgml/runtime.sgml
+++ b/doc/src/sgml/runtime.sgml
@@ -1127,13 +1127,8 @@ projadd -c "PostgreSQL DB User" -K "project.max-shm-memory=(privileged,8GB,deny)
        </para>

        <para>
-        Other recommended kernel setting changes for database servers which will
-        have a large number of connections are:
-<programlisting>
-project.max-shm-ids=(priv,32768,deny)
-project.max-sem-ids=(priv,4096,deny)
-project.max-msg-ids=(priv,4096,deny)
-</programlisting>
+        To run a very large server, or multiple servers concurrently, you
+        might also need to raise <literal>project.max-shm-ids</literal>.
        </para>

        <para>
diff --git a/meson.build b/meson.build
index ddf5172982f..40fbbbcd3fe 100644
--- a/meson.build
+++ b/meson.build
@@ -324,6 +324,7 @@ elif host_system == 'openbsd'

 elif host_system == 'sunos'
   portname = 'solaris'
+  sema_kind = 'unnamed_posix'
   export_fmt = '-Wl,-M@0@'
   # We need these #defines to get POSIX-conforming versions
   # of many interfaces (sigwait, getpwuid_r, shmdt, ...).
diff --git a/src/template/solaris b/src/template/solaris
index a4d8d38a8f8..ea524fdb2bd 100644
--- a/src/template/solaris
+++ b/src/template/solaris
@@ -1,4 +1,9 @@
 # src/template/solaris

+# Prefer unnamed POSIX semaphores if available, unless user overrides choice
+if test x"$PREFERRED_SEMAPHORES" = x"" ; then
+  PREFERRED_SEMAPHORES=UNNAMED_POSIX
+fi
+
 # Extra CFLAGS for code that will go into a shared library
 CFLAGS_SL="-fPIC"

pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Speed up COPY FROM text/CSV parsing using SIMD
Next
From: "Greg Burd"
Date:
Subject: Re: Areas for Solaris support modernization