Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEia9-0006nh-Tm for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Dec 2016 20:12:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cEia9-0006Pn-Ge for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Dec 2016 20:12:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cEia9-0006Pa-35 for pgsql-hackers@postgresql.org; Wed, 07 Dec 2016 20:12:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cEia6-0008Ih-4t for pgsql-hackers@postgresql.org; Wed, 07 Dec 2016 20:12:48 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uB7KCiwa027283; Wed, 7 Dec 2016 15:12:44 -0500 From: Tom Lane To: Robert Haas cc: "pgsql-hackers@postgresql.org" Subject: Re: Back-patch use of unnamed POSIX semaphores for Linux? In-reply-to: References: <32387.1481079186@sss.pgh.pa.us> <4886.1481086483@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Wed, 07 Dec 2016 13:53:34 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27281.1481141564.1@sss.pgh.pa.us> Date: Wed, 07 Dec 2016 15:12:44 -0500 Message-ID: <27282.1481141564@sss.pgh.pa.us> X-Pg-Spam-Score: -4.9 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas writes: > On Tue, Dec 6, 2016 at 11:54 PM, Tom Lane wrote: >> Robert Haas writes: >>> On Tue, Dec 6, 2016 at 9:53 PM, Tom Lane wrote: >>>> I think we should give serious consideration to back-patching commit >>>> ecb0d20a9, which changed the default semaphore type to unnamed-POSIX >>>> on Linux. >>> Urk. That sounds like a scary thing to back-patch. >> I don't deny that it's scary, but the alternative seems to be to be >> rather badly broken on systemd-using distros for years to come. >> That's pretty scary too. > Why can't this be configurable? It already is. Note that I said "default". As things stand, it's only a configure-time choice, but I've been thinking that we might be well advised to make it run-time configurable. I do not believe that anyone's still using a Linux version wherein POSIX semas wouldn't work, but I am not convinced that the same is true for FreeBSD. And a configure-run-time test is not a pleasant option because it doesn't work for cross-compiles. So really, on platforms where we think POSIX semas might work, it'd be best to try a sem_init() during postmaster start and then fall back to SysV if it doesn't work. But this is all kind of moot if Peter is right that systemd will zap POSIX shmem along with SysV semaphores. I've been trying to reproduce the issue on a Fedora 25 installation, and so far I can't get it to zap anything, so I'm a bit at a loss how to prove things one way or the other. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers