Re: Idle In Transaction Session Timeout, revived - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Idle In Transaction Session Timeout, revived
Date
Msg-id 20160204201911.flztccu5vqjt2hyo@alap3.anarazel.de
Whole thread Raw
In response to Re: Idle In Transaction Session Timeout, revived  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On 2016-02-04 22:24:50 +0900, Fujii Masao wrote:
> But, IIRC, one of the problems that prevent the adoption of this feature is
> the addition of gettimeofday() call after every SQL command receipt.
> Have you already resolved that problem? Or we don't need to care about
> it because it's almost harmless?

Well, it only happens when the feature is enabled, not
unconditionally. So I don't think that's particularly bad, as long as
the feature is not enabled by default.


If we feel we need to something about the gettimeofday() call at some
point, I think it'd made a lot of sense to introduce a more centralize
"statement stop" time, and an extended pgstat_report_activity() that
allows to specify the timestamp. Because right now we'll essentially do
gettimeofday() calls successively when starting a command, starting a
transaction, committing a transaction, and finishing a comment. That's
pretty pointless.

Andres



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Support for N synchronous standby servers - take 2
Next
From: Andres Freund
Date:
Subject: Re: "using previous checkpoint record at" maybe not the greatest idea?