"Robert M. Meyer" <rmeyer@installs.com> writes:
> Hmmm... You're right. How much longer does a '-m fast' take. The
> reason I ask is because during a server shutdown, init doesn't wait
> around long after the script exits. The problem with not using the '-m'
> is that pg_ctl returns quickly but the DB may not be down, causing the
> system to pull the rug out from under it.
(a) The solution to that is to use the -w option to pg_ctl, no?
(b) -m immediate is just as dangerous as letting the system pull the
rug out. Probably more so, as the system is unlikely to get around to
killing Postgres before we've had a chance to flush shared buffers.
regards, tom lane