Re: Updated macOS start scripts - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Updated macOS start scripts
Date
Msg-id 7563.1511901646@sss.pgh.pa.us
Whole thread Raw
In response to Re: Updated macOS start scripts  (Mark Dilger <hornschnorter@gmail.com>)
List pgsql-hackers
Mark Dilger <hornschnorter@gmail.com> writes:
>> On Nov 28, 2017, at 11:17 AM, Tom Lane <tgl@sss.pgh.pa.us> 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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgindent run?
Next
From: Tom Lane
Date:
Subject: Re: pgindent run?