Re: idle_in_transaction_timeout

From: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
To: Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: idle_in_transaction_timeout
Date: 2014-06-03 14:07:49
Message-ID: 538DD6B5.8010705@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06/03/2014 03:30 PM, Abhijit Menon-Sen wrote:
> At 2014-06-03 15:06:11 +0200, vik(dot)fearing(at)dalibo(dot)com wrote:
>> This patch implements a timeout for broken clients that idle in
>> transaction.
> I think this is a nice feature, but I suggest that (at the very least)
> the GUC should be named "idle_transaction_timeout".

I prefer the way I have it, but not enough to put up a fight if other
people like your version better.

>> + <para>
>> + Terminate any session that is idle in transaction for longer than the specified
>> + number of seconds. This not only allows any locks to be released, but also allows
>> + the connection slot to be reused. However, aborted idle in transaction sessions
>> + are not affected. A value of zero (the default) turns this off.
>> + </para>
> I suggest:
>
> Terminate any session with an open transaction that has been idle
> for longer than the specified duration in seconds. This allows any
> locks to be released and the connection slot to be reused.
>
> It's not clear to me what "However, aborted idle in transaction sessions
> are not affected" means.
>
> The default value of 0 means that such sessions will not be
> terminated.

How about this?

Terminate any session with an open transaction that has been idle
for longer than the specified duration in seconds. This allows any
locks to be released and the connection slot to be reused.

Sessions in the state "idle in transaction (aborted)" occupy a
connection slot but because they hold no locks, they are not
considered by this parameter.

The default value of 0 means that such sessions will not be
terminated.
--
Vik

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-06-03 14:14:11 Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?
Previous Message David G Johnston 2014-06-03 14:02:08 Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?