Re: timeout for "idle in transaction" - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: timeout for "idle in transaction"
Date
Msg-id 3BD81E26.5299B515@tm.ee
Whole thread Raw
In response to timeout for "idle in transaction"  (Hannu Krosing <hannu@tm.ee>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: pgindent run
Next
From: "Nicolas Verger"
Date:
Subject: Re: Index not used ! Why? + Little graphical client ...