Re: idle_in_transaction_timeout

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: idle_in_transaction_timeout
Date: 2014-06-19 22:18:40
Message-ID: 13010.1403216320@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-06-19 22:33:07 Re: idle_in_transaction_timeout
Previous Message Vik Fearing 2014-06-19 21:57:01 Re: change alter user to be a true alias for alter role