Mark Dilger <hornschnor...@gmail.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

Reply via email to