Re: Feature thought: idle in transaction timeout - Mailing list pgsql-hackers

From Joshua D. Drake
Subject Re: Feature thought: idle in transaction timeout
Date
Msg-id 460E880E.3020701@commandprompt.com
Whole thread Raw
In response to Re: Feature thought: idle in transaction timeout  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> "Joshua D. Drake" <jd@commandprompt.com> writes:
>> Russell Smith wrote:
>>> I agree with this, it reduces the long running transaction problem a 
>>> little where the user forgot to commit/rollback their session.  I may be 
>>> worth having a transaction_timeout as well, and setting it to link a few 
>>> hours by default.  That way you can't have really long running 
>>> transactions unless you specifically set that.
> 
>> We would certainly need to be able to disable on the fly too just with 
>> SET as well.
> 
> AFAICS, a *transaction* timeout per se has no use whatever except as a
> foot-gun.  How will you feel when you start a 12-hour restore, go home
> for the evening, and come back in the morning to find it aborted because
> you forgot to disable your 4-hour timeout?

Well of course that would be bad. That is why I said, idle in 
transaction. If you are idle, you are doing nothing yes?

Joshua D. Drake


> 
> Furthermore, if you have to set transaction_timeout to multiple hours
> in the (vain) hope of not killing something important, what use is it
> really?  If you want to keep VACUUM able to work in a busy database,
> you need it to be a lot less than that.
> 
> An *idle* timeout seems less risky, as well as much easier to pick a
> sane value for.
> 
>             regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
> 
>                 http://www.postgresql.org/about/donate
> 


-- 
      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997             http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Feature thought: idle in transaction timeout
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Feature thought: idle in transaction timeout