Re: Request: pg_cancel_backend variant that handles 'idle in transaction' sessions - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Request: pg_cancel_backend variant that handles 'idle in transaction' sessions
Date
Msg-id 5637B84F.2050704@BlueTreble.com
Whole thread Raw
In response to Re: Request: pg_cancel_backend variant that handles 'idle in transaction' sessions  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: Request: pg_cancel_backend variant that handles 'idle in transaction' sessions  (Merlin Moncure <mmoncure@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: pglogical_output - a general purpose logical decoding output plugin
Next
From: Robert Haas
Date:
Subject: Re: [ADMIN] Replication slots and isolation levels