Re: Updated macOS start scripts

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Updated macOS start scripts
Дата
Msg-id 3786.1511896652@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Updated macOS start scripts  (Mark Dilger <hornschnorter@gmail.com>)
Ответы Re: Updated macOS start scripts
Список pgsql-hackers
Mark Dilger <hornschnorter@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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: With commit 4e5fe9ad19, range partition missing handling for theNULL partition key
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Typo in ExecBuildSlotPartitionKeyDescription prologue