
Is there a way to automatically ROLLBACK transactions that are 
in "idle in transaction" for too long ?

I remember it has been discussed on this list, but what is the current
status ?

This is a problem that has haunted me on several web applicatons using 
application servers that have persistent connection (Zope, apache-php
with 
persistent connections)

-------------------
Hannu

Thu, 25 Oct 2001 10:18:20 +0500
Hannu Krosing <hannu@tm.ee>
timeout for "idle in transaction"
Hannu Krosing <hannu@tm.ee> writes:
> Is there a way to automatically ROLLBACK transactions that are 
> in "idle in transaction" for too long ?

Nope, we don't have anything for that.  Not clear to me that it's
appropriate as a server-side function anyway.

			regards, tom lane

Thu, 25 Oct 2001 08:49:43 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: timeout for "idle in transaction" 
Tom Lane wrote:
> 
> Hannu Krosing <hannu@tm.ee> writes:
> > Is there a way to automatically ROLLBACK transactions that are
> > in "idle in transaction" for too long ?
> 
> Nope, we don't have anything for that.  Not clear to me that it's
> appropriate as a server-side function anyway.

This can't be done from the client side and we do have other types of 
deadlock detection on server side so this seems to quite appropriate 
from where I stand.

I guess it would be quite nice to have as a connection-level setting, 
so that things that benefit from it can set it to some reasonable 
value while others that want to behave unsocially  can do it as well ;)

The default could be 1-3 sec of idle time in transaction for typical 
client-server and web apps while command line clients (like psql) could 
set it to something more automatically.

-----------------
Hannu

Thu, 25 Oct 2001 16:13:58 +0200
Hannu Krosing <hannu@tm.ee>
Re: timeout for "idle in transaction"