idle_in_transaction_timeout - Mailing list pgsql-hackers

From Vik Fearing
Subject idle_in_transaction_timeout
Date
Msg-id 538DC843.2070608@dalibo.com
Whole thread Raw
Responses Re: idle_in_transaction_timeout  (Abhijit Menon-Sen <ams@2ndquadrant.com>)
List 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

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?
Next
From: Abhijit Menon-Sen
Date:
Subject: Re: idle_in_transaction_timeout