Re: Areas for Solaris support modernization

From: "Greg Burd" <greg(at)burd(dot)me>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Thomas Munro" <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: Areas for Solaris support modernization
Date: 2026-03-02 20:40:56
Message-ID: e93280ed-169a-4255-9b36-c0556ce4bf87@app.fastmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Mon, Mar 2, 2026, at 3:28 PM, Tom Lane wrote:
> "Greg Burd" <greg(at)burd(dot)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 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.

Roger, wilco. As soon as the previous patch run finishes up I'll start another with this additive change set.

best.

-greg

> 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(at)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"
>
> Attachments:
> * change-sema-API-for-Solaris.patch

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2026-03-02 21:34:23 Re: [19] CREATE SUBSCRIPTION ... SERVER
Previous Message Tom Lane 2026-03-02 20:28:06 Re: Areas for Solaris support modernization