Switch pg_ctl's default about waiting?

Started by Tom Laneabout 25 years ago4 messages
#1Tom Lane
tgl@sss.pgh.pa.us

Now that the postmaster takes a noticeable amount of time to shut down,
I'm wondering if pg_ctl's default about whether or not to wait ought
to be reversed. That is, "-w" would become the norm, and some new
switch ("-n" maybe) would be needed if you didn't want it to wait.

Comments?

regards, tom lane

#2Mikheev, Vadim
vmikheev@SECTORBASE.COM
In reply to: Tom Lane (#1)
RE: Switch pg_ctl's default about waiting?

Now that the postmaster takes a noticeable amount of time to
shut down, I'm wondering if pg_ctl's default about whether or not
to wait ought to be reversed. That is, "-w" would become the norm,
and some new switch ("-n" maybe) would be needed if you didn't want
it to wait.

Comments?

Agreed.

Actually, without -m f|i flag to pg_ctl and with active sessions 7.0.X
postmaster shuts down long time too.

Vadim

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#1)
Re: Switch pg_ctl's default about waiting?

Tom Lane writes:

Now that the postmaster takes a noticeable amount of time to shut down,
I'm wondering if pg_ctl's default about whether or not to wait ought
to be reversed. That is, "-w" would become the norm, and some new
switch ("-n" maybe) would be needed if you didn't want it to wait.

Two concerns:

1. The waiting isn't very reliable as we recently found out. (If you
wait on shutdown, then wait on startup would be default as well, no?)

2. Why would you necessarily care to wait for shutdown? Startup I can
see, but shutdown doesn't seem so important.

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#3)
Re: Switch pg_ctl's default about waiting?

Peter Eisentraut <peter_e@gmx.net> writes:

2. Why would you necessarily care to wait for shutdown? Startup I can
see, but shutdown doesn't seem so important.

Well, maybe I'm the only one who has a script like
pg_ctl -w stop
cd ~/.../backend; make installbin
pg_ctl start
but I got burnt regularly until I put -w in there ;-)

regards, tom lane