Re: Implementing setQueryTimeout()

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, PostgreSQL - JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Implementing setQueryTimeout()
Date: 2008-02-19 03:12:30
Message-ID: 47BA491E.9090603@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Tom Lane wrote:
> Oliver Jowett <oliver(at)opencloud(dot)com> writes:
>> Tom Lane wrote:
>>> I think it's a serious, serious conceptual error to tie network timeouts
>>> to query timeouts.
>
>> Why? I don't understand this argument.
>
> Because the failure mechanisms that you're worried about are completely
> different in the two cases, and don't necessarily have similar timeout
> requirements (to say nothing of the appropriate recovery actions).

Which is fair enough .. but I have a single JDBC method to work with
here. I could implement something driver-specific but it seems a little
silly to have timeout behaviour in the driver but have the standard
method unimplemented.

Note that you could implement different recovery behaviour by looking at
the SQLState of the thrown exception easily enough.

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2008-02-19 04:39:56 Re: Implementing setQueryTimeout() - round 2
Previous Message Tom Lane 2008-02-19 03:07:50 Re: Implementing setQueryTimeout()