Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEkwr-0005dR-Oh for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Dec 2016 22:44:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cEkwr-0002G0-9s for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Dec 2016 22:44:25 +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 1cEkvS-0000dg-Je for pgsql-hackers@postgresql.org; Wed, 07 Dec 2016 22:42:58 +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 1cEkvP-0002tK-Jd for pgsql-hackers@postgresql.org; Wed, 07 Dec 2016 22:42:58 +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 uB7MgqaD032666; Wed, 7 Dec 2016 17:42:52 -0500 From: Tom Lane To: Alex Hunsaker cc: Robert Haas , "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> <27282.1481141564@sss.pgh.pa.us> Comments: In-reply-to Alex Hunsaker message dated "Wed, 07 Dec 2016 14:37:53 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32664.1481150572.1@sss.pgh.pa.us> Date: Wed, 07 Dec 2016 17:42:52 -0500 Message-ID: <32665.1481150572@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 Alex Hunsaker writes: > On Wed, Dec 7, 2016 at 1:12 PM, Tom Lane wrote: >> 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. > After logon, you should see "/usr/lib/systemd/systemd --user" running for > that user. After logout out, said proc should exit. Hmm ... after further experimentation, I still can't get this version of systemd (231) to do anything evil. It turns out that Fedora ships it with KillUserProcesses turned off by default, and maybe having that on is a prerequisite for the other behavior? But that doesn't make a lot of sense because we'd never be seeing the reports of databases moaning about lost semaphores if the processes got killed first. Anyway, I see nothing bad happening if KillUserProcesses is off, while if it's on then the database gets shut down reasonably politely via SIGTERM. Color me confused ... maybe systemd's behavior has changed? 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