Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vx9tJ-000ilX-2u for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Mar 2026 20:29:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vx9sI-002wQm-0I for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Mar 2026 20:28:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vx9sH-002wQd-2e for pgsql-hackers@lists.postgresql.org; Mon, 02 Mar 2026 20:28:18 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vx9sB-000000004Ss-2zfF for pgsql-hackers@lists.postgresql.org; Mon, 02 Mar 2026 20:28:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 622KS6P9881234; Mon, 2 Mar 2026 15:28:07 -0500 From: Tom Lane To: "Greg Burd" cc: "PostgreSQL Hackers" , "Thomas Munro" Subject: Re: Areas for Solaris support modernization In-reply-to: <2cbf958e-a36f-4121-b9e9-13ebaaa1cb2c@app.fastmail.com> References: <470305.1772417108@sss.pgh.pa.us> <476159.1772419827@sss.pgh.pa.us> <2cbf958e-a36f-4121-b9e9-13ebaaa1cb2c@app.fastmail.com> Comments: In-reply-to "Greg Burd" message dated "Mon, 02 Mar 2026 14:48:11 -0500" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <881100.1772483270.0@sss.pgh.pa.us> Date: Mon, 02 Mar 2026 15:28:06 -0500 Message-ID: <881232.1772483286@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <881100.1772483270.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable "Greg Burd" 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 take as 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 ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="change-sema-API-for-Solaris.patch"; charset="us-ascii" Content-ID: <881100.1772483270.2@sss.pgh.pa.us> Content-Description: change-sema-API-for-Solaris.patch Content-Transfer-Encoding: quoted-printable 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=3D(privileged,8GB,deny) = - Other recommended kernel setting changes for database servers whi= ch will - have a large number of connections are: - -project.max-shm-ids=3D(priv,32768,deny) -project.max-sem-ids=3D(priv,4096,deny) -project.max-msg-ids=3D(priv,4096,deny) - + To run a very large server, or multiple servers concurrently, you + might also need to raise project.max-shm-ids. = 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 =3D=3D 'openbsd' = elif host_system =3D=3D 'sunos' portname =3D 'solaris' + sema_kind =3D 'unnamed_posix' export_fmt =3D '-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 cho= ice +if test x"$PREFERRED_SEMAPHORES" =3D x"" ; then + PREFERRED_SEMAPHORES=3DUNNAMED_POSIX +fi + # Extra CFLAGS for code that will go into a shared library CFLAGS_SL=3D"-fPIC" ------- =_aaaaaaaaaa0--