Re: idle_in_transaction_timeout

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Marko Tiikkaja <marko(at)joh(dot)to>, Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: idle_in_transaction_timeout
Date: 2014-06-19 00:01:20
Message-ID: 53A22850.1020707@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06/18/2014 04:54 PM, Marko Tiikkaja wrote:
> On 2014-06-19 1:46 AM, Josh Berkus wrote:
>> Robert's right, not killing the "BEGIN;" only transactions is liable to
>> result in user confusion unless we label those sessions differently in
>> pg_stat_activity.
>
> Wouldn't they be labeled differently already? i.e. the last query would
> be "BEGIN". Unless your app tries to unsuccessfully use nested
> transactions, you would know why it hasn't been killed.

That's pretty darned obscure for a casual user. *you* would know, and
*I* would know, but 99.5% of our users would be very confused.

Plus, if a session which has only issued a "BEGIN;" doesn't have a
snapshot and isn't holding any locks, then I'd argue we shouldn't lable
it IIT in the first place because it's not doing any of the bad stuff we
want to resolve by killing IITs. Effectively, it's just "idle".

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-06-19 00:15:14 Re: /proc/self/oom_adj is deprecated in newer Linux kernels
Previous Message Marko Tiikkaja 2014-06-18 23:54:28 Re: idle_in_transaction_timeout