Re: Switch to unnamed POSIX semaphores as our preferred sema code?

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christoph Berg <myon(at)debian(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Switch to unnamed POSIX semaphores as our preferred sema code?
Date: 2016-10-10 19:10:00
Message-ID: CAEepm=2kc6piMFxMba=YPF6rh_HeRsz-H-PgCrH71dAYFKtQXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 11, 2016 at 5:57 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> So at this point it seems likely that stopping with Linux and FreeBSD
> is the thing to do, and as far as I can tell the code we have now is
> working with all variants of those that we have in the buildfarm.
> (I'm a little suspicious that older variants of FreeBSD might not
> have working sem_init, like the other *BSD variants, necessitating
> a run-time test there. But we'll cross that bridge when we come
> to it.)

The sem_init man page from FreeBSD 8.4[1] (EOL August 2015) and earlier said:

This implementation does not support shared semaphores, and reports this
fact by setting errno to EPERM.

FreeBSD 9.0 (released January 2012) reimplemented semaphores and
removed those words from that man page[2]. All current releases[3]
support it, though I guess there may be 8.4 machines out there a year
and a bit after EOL.

[1] https://www.freebsd.org/cgi/man.cgi?query=sem_init&apropos=0&sektion=0&manpath=FreeBSD+8.4-RELEASE&arch=default&format=html
[2] https://www.freebsd.org/cgi/man.cgi?query=sem_init&apropos=0&sektion=0&manpath=FreeBSD+9.0-RELEASE&arch=default&format=html
[3] https://www.freebsd.org/releases/

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-10-10 19:17:13 Re: Switch to unnamed POSIX semaphores as our preferred sema code?
Previous Message Robert Haas 2016-10-10 18:35:11 Re: pgbench vs. wait events