Re: Updated macOS start scripts

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Dilger <hornschnorter(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Updated macOS start scripts
Date: 2017-11-28 20:40:46
Message-ID: 7563.1511901646@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mark Dilger <hornschnorter(at)gmail(dot)com> writes:
>> On Nov 28, 2017, at 11:17 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-11-28 20:47:17 Re: pgindent run?
Previous Message Tom Lane 2017-11-28 20:37:29 Re: pgindent run?