From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Dilger <hornschnorter@gmail.com>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: Updated macOS start scripts
Date: Tue, 28 Nov 2017 14:17:32 -0500
Message-ID: <3786.1511896652@sss.pgh.pa.us> (raw)
In-Reply-To: <173420E2-64DB-4802-9EB2-AEFB11F46045@gmail.com>
References: <31338.1510763554@sss.pgh.pa.us>
<6D443E39-13C2-4185-9FE4-B5CB416AB06E@gmail.com>
<21689.1510772433@sss.pgh.pa.us>
<F8F64F48-C070-41C1-A1EE-1F25836B6FAF@gmail.com>
<173420E2-64DB-4802-9EB2-AEFB11F46045@gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, hornschnorter@gmail.com
Subject: Re: Updated macOS start scripts
In-Reply-To: <3786.1511896652@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox