Re: smart shutdown at end of transaction (was: Default mode for shutdown)

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: smart shutdown at end of transaction (was: Default mode for shutdown)
Date: 2012-04-27 18:39:16
Message-ID: 201204272039.17202.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Friday, April 27, 2012 07:42:59 PM Robert Haas wrote:
> On Wed, Dec 15, 2010 at 10:11 AM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:
> > It occurs to me that we may need a new mode, which disconnects sessions
> > that are not in a transaction (or as soon as they are) but leaves
> > in-progress transactions alone; this could be the new default. Of
> > course, this is much more difficult to implement than the current modes.
>
> This idea appeared to have some support. I'd like to suggest that we
> take this a step further. Instead of adding a fourth mode, I'd like
> to suggest that we redefine "smart" to have the behavior described
> above. This is based on the theory that (1) people who like smart
> shutdown like it because it allows currently-running transactions to
> complete without error, and will find it acceptable to have idle
> transactions terminated immediately and other sessions terminated
> after the command completes; and (2) people who dislike smart shutdown
> (such as me) dislike it primarily because a completely idle session
> that someone's forgotten to close can prevent shutdown indefinitely.
> Either part of this theory could be wrong, of course, although I'm
> pretty sure #2 holds for me personally at the least.
I think the current smart mode is rather useful. There is quite some stuff
that you cannot do inside a transaction - or it doesn't make sense - which
still needs to shutdown gracefully. E.g. transaction managers.

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2012-04-27 18:47:25 Re: smart shutdown at end of transaction (was: Default mode for shutdown)
Previous Message Simon Riggs 2012-04-27 18:38:10 Re: smart shutdown at end of transaction (was: Default mode for shutdown)