Re: Re: pg_ctl default shutdown mode - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: pg_ctl default shutdown mode
Date
Msg-id 3817.981823869@sss.pgh.pa.us
Whole thread Raw
In response to RE: Re: pg_ctl default shutdown mode  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses Re: Re: pg_ctl default shutdown mode  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
"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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: [DOCS] Open 7.1 items
Next
From: Peter Eisentraut
Date:
Subject: Re: Re: [PATCHES] Fix for ODBC close