Re: smart shutdown at end of transaction (was: Default mode for shutdown) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: smart shutdown at end of transaction (was: Default mode for shutdown)
Date
Msg-id 26227.1335625939@sss.pgh.pa.us
Whole thread Raw
In response to Re: smart shutdown at end of transaction (was: Default mode for shutdown)  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: smart shutdown at end of transaction (was: Default mode for shutdown)  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On fre, 2012-04-27 at 22:30 +0200, Andres Freund wrote:
>> In the few cases where I investigated it TMs don't use transactions
>> themselves (which I think is correct, they don't need them), so
>> terminating any idle session - which the TM would appear as, as its
>> not using txns - would leave prepared transactions in a limbo state
>> till the database is up again, instead of waiting till all prepared
>> transactions are either aborted or committed. It may also choose to
>> coordinate to abort all transactions, but all that is hard if the
>> database shuts you out.

> This would lead to another shutdown mode, one that terminates idle
> sessions unless they have prepared transactions.  That could be useful.

Huh?  Prepared transactions aren't associated with sessions.  At least
not in a context using a TM --- the TM will be doing commits or
rollbacks from a session different from the ones that ran the prepared
transactions.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: xReader, double-effort (was: Temporary tables under hot standby)
Next
From: "Kevin Grittner"
Date:
Subject: Re: Re: xReader, double-effort (was: Temporary tables under hot standby)