Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEUFn-0007n8-VH for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Dec 2016 04:54:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cEUFn-0000Dx-8W for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Dec 2016 04:54:51 +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 1cEUFm-0000Dq-NL for pgsql-hackers@postgresql.org; Wed, 07 Dec 2016 04:54:50 +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 1cEUFi-0005ZC-CE for pgsql-hackers@postgresql.org; Wed, 07 Dec 2016 04:54:50 +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 uB74shcI004887; Tue, 6 Dec 2016 23:54:43 -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> Comments: In-reply-to Robert Haas message dated "Tue, 06 Dec 2016 23:43:56 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4885.1481086483.1@sss.pgh.pa.us> Date: Tue, 06 Dec 2016 23:54:43 -0500 Message-ID: <4886.1481086483@sss.pgh.pa.us> X-Pg-Spam-Score: -4.8 (----) 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 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. > ... Granted, that might not > happen, because maybe unnamed POSIX semas are one of those really > awesome operating system primitives that never has problems on any > system anywhere ever. But I think it's pretty hard to be certain of > that. You're attacking a straw man. I didn't propose changing our behavior anywhere but Linux. AFAIK, on that platform unnamed POSIX semaphores are futexes, which have been a stable feature since 2003 according to https://en.wikipedia.org/wiki/Futex#History. Anybody who did need to compile PG for use with a pre-2.6 kernel could override the default, anyway. Now, I did think of a problem we'd have to deal with, which is how to avoid breaking ABI by changing sizeof(PGSemaphoreData). I think that's soluble though. 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