"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
>> From: Peter Eisentraut [mailto:peter_e@gmx.net]
>> Just curious. I
>> just think that waiting by default and smart shutdown don't really mix
>> well.
> Current behavior prevents manual shutdown from cancelling
> running sessions carelessly.
Seems that pg_ctl is being made to serve two different purposes:
one, manual shutdown, and two, automated shutdown during system-wide
shutdown. In the second case, 'fast' shutdown is the appropriate thing,
but in the first case I think 'smart' shutdown is definitely the safer
and more appropriate default.
So, how to resolve that conflict? I think it's better for the script
default to cater to the manual-invocation case, because you're more
likely to forget to add the switch when you're entering the command by
hand. When pg_ctl is invoked from a system shutdown script, you only
have to get it right once, and then the script remembers for you ;-).
In short: I agree with Hiroshi on this one. Let's leave the script
default at 'smart' shutdown, and make it clear in the documentation
that "-mode fast" is the best way to invoke it from a system-shutdown
script.
regards, tom lane