idle_in_transaction_timeout

From: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: idle_in_transaction_timeout
Date: 2014-06-03 13:06:11
Message-ID: 538DC843.2070608@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

This patch implements a timeout for broken clients that idle in transaction.

This is a TODO item.

When the timeout occurs, the backend commits suicide with a FATAL
ereport. I thought about just aborting the transaction to free the
locks but decided that the client is clearly broken so might as well
free up the connection as well.

The same behavior can be achieved by an external script that monitors
pg_stat_activity but by having it in core we get much finer tuning (it
is session settable) and also traces of it directly in the PostgreSQL
logs so it can be graphed by things like pgbadger.

Unfortunately, no notification is sent to the client because there's no
real way to do that right now.

--
Vik

Attachment Content-Type Size
iitt.v1.patch text/x-diff 7.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Abhijit Menon-Sen 2014-06-03 13:30:42 Re: idle_in_transaction_timeout
Previous Message Robert Haas 2014-06-03 12:39:13 Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?