Re: Feature freeze date for 8.1

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Oliver Jowett <oliver(at)opencloud(dot)com>, adnandursun(at)asrinbilisim(dot)com(dot)tr, Peter Eisentraut <peter_e(at)gmx(dot)net>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Feature freeze date for 8.1
Date: 2005-05-02 05:05:15
Message-ID: 4275B50B.20601@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> We would? Why? Please provide a motivation that justifies the
> considerably higher cost to make it count that way, as opposed to
> time-since-BEGIN.

The specific scenario this feature is intended to resolve is
idle-in-transaction backends holding on to resources while the network
connection times out; it isn't intended to implement "I never want to
run a transaction that takes more than X seconds to execute." While
long-running transactions aren't usually a great idea, I can certainly
imagine installations in which some transactions might take, say, 30
minutes to execute but the admin would like to timeout idle connections
in less than that amount of time.

As for cost, this feature has zero cost until it is enabled. I would
also guess that setitimer() is reasonably cheap on most kernels,
although let me know if I'm mistaken. If it's sufficiently expensive
that a setitimer() per query is noticeable, then I agree that
setitimer() at BEGIN-time is probably sufficient for most people.

> Once we've been motivated to try to send an error message to the
> client, the relevant timeouts are way shorter than they are under
> connection-idle conditions.

Sorry, yes, I should have been more clear.

-Neil

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Jowett 2005-05-02 05:20:07 Re: Feature freeze date for 8.1
Previous Message Tom Lane 2005-05-02 04:41:33 Re: Feature freeze date for 8.1

Browse pgsql-patches by date

  From Date Subject
Next Message Oliver Jowett 2005-05-02 05:20:07 Re: Feature freeze date for 8.1
Previous Message Tom Lane 2005-05-02 04:41:33 Re: Feature freeze date for 8.1