Re: idle_in_transaction_timeout - Mailing list pgsql-hackers

From Tom Lane
Subject Re: idle_in_transaction_timeout
Date
Msg-id 75706.1403710847@sss.pgh.pa.us
Whole thread Raw
In response to Re: idle_in_transaction_timeout  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: idle_in_transaction_timeout  (Fujii Masao <masao.fujii@gmail.com>)
Re: idle_in_transaction_timeout  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Fujii Masao <masao.fujii@gmail.com> writes:
> Why is IIT timeout turned on only when send_ready_for_query is true?
> I was thinking it should be turned on every time a message is received.
> Imagine the case where the session is in idle-in-transaction state and
> a client gets stuck after sending Parse message and before sending Bind
> message. This case would also cause long transaction problem and should
> be resolved by IIT timeout. But IIT timeout that this patch adds cannot
> handle this case because it's enabled only when send_ready_for_query is
> true. Thought?

I think you just moved the goalposts to the next county.

The point of this feature, AFAICS, is to detect clients that are failing
to issue another query or close their transaction as a result of bad
client logic.  It's not to protect against network glitches.

Moreover, there would be no way to implement a timeout like that without
adding a gettimeofday() call after every packet receipt, which is overhead
we do not need and cannot afford.  I don't think this feature should add
*any* gettimeofday's beyond the ones that are already there.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_filedump for 9.4?
Next
From: Robert Haas
Date:
Subject: Re: RLS Design