Re: Request: pg_cancel_backend variant that handles 'idle in transaction' sessions

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Request: pg_cancel_backend variant that handles 'idle in transaction' sessions
Date: 2015-11-02 19:23:59
Message-ID: 5637B84F.2050704@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/2/15 11:15 AM, Pavel Stehule wrote:
> I have not strong idea about how to solve it well - maybe introduce
> transaction_idle_timeout and session_idle_timeout?

Yes, please. This is a very common problem. I would love a better way to
detect (or prevent) clients from being brain-dead about how they're
using transactions, but short of that this is the next best thing.

Actually, one other thing that would help is to have the ability to turn
this into an ERROR:

begin;
WARNING: there is already a transaction in progress
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-11-02 19:26:26 Re: BUG #13741: vacuumdb does not accept valid password
Previous Message Jim Nasby 2015-11-02 18:58:31 Re: pglogical_output - a general purpose logical decoding output plugin