Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJmgU-00017L-Lw for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Nov 2017 20:40:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJmgU-0007Tz-4O for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Nov 2017 20:40:50 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eJmgT-0007Tp-Qz for pgsql-hackers@lists.postgresql.org; Tue, 28 Nov 2017 20:40:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eJmgR-0006ez-Hi for pgsql-hackers@postgreSQL.org; Tue, 28 Nov 2017 20:40: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 vASKekfR007564; Tue, 28 Nov 2017 15:40:46 -0500 From: Tom Lane To: Mark Dilger cc: pgsql-hackers@postgreSQL.org Subject: Re: Updated macOS start scripts In-reply-to: References: <31338.1510763554@sss.pgh.pa.us> <6D443E39-13C2-4185-9FE4-B5CB416AB06E@gmail.com> <21689.1510772433@sss.pgh.pa.us> <173420E2-64DB-4802-9EB2-AEFB11F46045@gmail.com> <3786.1511896652@sss.pgh.pa.us> Comments: In-reply-to Mark Dilger message dated "Tue, 28 Nov 2017 11:57:41 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7562.1511901646.1@sss.pgh.pa.us> Date: Tue, 28 Nov 2017 15:40:46 -0500 Message-ID: <7563.1511901646@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Mark Dilger writes: >> On Nov 28, 2017, at 11:17 AM, Tom Lane wrote: >> Hmm. Maybe we should have the plist file set KeepAlive to false not true? >> This would mean you'd need manual action to restart a failed postmaster, >> but that probably comes with the territory --- I do not see how we'd >> teach launchd the difference between a "failed" postmaster and a manually >> shut down one. > Setting KeepAlive to false does more than you probably want it to; it also > causes the service not to start on boot nor on load. After setting this to > false, I tried a reboot and the service was not started. I don't feel like digging in Apple's docs right now, but surely there's some option that will make it start the service on boot, but not restart it if it quits later? > Of course, you could make pg_ctl know how to interact with launchctl if you > like. That seems quite hard, and I am not volunteering.... Seems like a nonstarter to me --- for one thing, how would pg_ctl know to do that rather than its normal thing? And where would it get the service name? And how's it gonna do that at all if not superuser? regards, tom lane