Re: idle_in_transaction_timeout - Mailing list pgsql-hackers

From Tom Lane
Subject Re: idle_in_transaction_timeout
Date
Msg-id 13010.1403216320@sss.pgh.pa.us
Whole thread Raw
In response to Re: idle_in_transaction_timeout  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> Now ... can we decrease CPU overhead (wakeups) if we only check once per
> minute?  If so, there's a good argument for making 1min the minimum.

Polling wakeups are right out, and are unnecessary anyway.  The 
utils/misc/timeout.c infrastructure calculates the time left till the
closest timeout event.  So I don't see a need to worry about that end of
it.

ISTM our realistic options are for seconds or msec as the unit.  If it's
msec, we'd be limited to INT_MAX msec or around 600 hours at the top end,
which seems like enough to me but maybe somebody thinks differently?
Seconds are probably OK but I'm worried about somebody complaining that
that's not enough resolution, especially as machines get faster.

Whichever the unit, I don't see a reason to set a lower bound different
from "one".  You ask for a 1ms timeout, we'll give it to you, it's your
problem whether that's sane in your environment.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Vik Fearing
Date:
Subject: Re: change alter user to be a true alias for alter role
Next
From: Josh Berkus
Date:
Subject: Re: idle_in_transaction_timeout