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 19:17:32
Message-ID: 3786.1511896652@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:
> Upon further review, I have noticed that `pg_ctl stop` does not work once
> the org.postgresql.postgres service has been started. I was trying to stop,
> reinstall and re-initdb and restart postgres and this service was a pita. I had
> to go back to your osx.patch to remind myself what I had done and only then
> could I stop the service and continue my work.

> Is there any way this patch could be improved to work nicely with pg_ctl? It
> seems that `pg_ctl stop` indeed stops the postgres process, but the system
> launches a new one so quickly that pg_ctl thinks the service has not stopped,
> and it just waits forever (or until it times out, depending on your settings).

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.

I think the normal way to stop/restart a launchd service is to use
"launchctl unload/load" ... we'd need to see how that interacts with
using pg_ctl. Some documentation might be needed in any case.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-11-28 19:21:06 Re: Typo in ExecBuildSlotPartitionKeyDescription prologue
Previous Message Robert Haas 2017-11-28 19:16:43 Re: With commit 4e5fe9ad19, range partition missing handling for the NULL partition key