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

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: smart shutdown at end of transaction (was: Default mode for shutdown)
Date: 2012-04-27 19:36:15
Message-ID: 4F9AF52F.7000704@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27.04.2012 21:56, Tom Lane wrote:
> Magnus Hagander<magnus(at)hagander(dot)net> writes:
>> On Fri, Apr 27, 2012 at 20:48, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> I'm not necessarily opposed to commandeering the name "smart" for the
>>> new behavior, so that what we have to find a name for is the old "smart"
>>> behavior. How about
>>>
>>> slow - allow existing sessions to finish (old "smart")
>
>> How about "wait" instead of "slow"?
>
> I kinda liked "slow" vs "fast", but if you think that's too cute ...
> ("wait" doesn't seem very good, though, since all these except immediate
> are waiting, just for different things.)

All the modes indeed wait (except for immediate), so I think it would
make sense to define the modes in terms of *what* they wait for.

wait sessions - allow existing sessions to finish (old "smart")
wait transactions - allow existing transactions to finish (new)
wait checkpoint - kill active queries
wait none - unclean shutdown

Hmm, the latter two are perhaps a bit confusing. So maybe:

wait_sessions - allow existing sessions to finish (old "smart")
wait_transactions - allow existing transactions to finish (new)
fast - kill active queries
immediate - unclean shutdown

Just thinking out loud here..

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aakash Goel 2012-04-27 19:49:39 Re: xReader, double-effort (was: Temporary tables under hot standby)
Previous Message Noah Misch 2012-04-27 19:05:41 Re: psql omits row count under "\x auto"