Re: Implementing setQueryTimeout() - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Implementing setQueryTimeout()
Date
Msg-id 47BA491E.9090603@opencloud.com
Whole thread Raw
In response to Re: Implementing setQueryTimeout()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Implementing setQueryTimeout() - round 2  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
Tom Lane wrote:
> Oliver Jowett <oliver@opencloud.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


pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: Implementing setQueryTimeout()
Next
From: Oliver Jowett
Date:
Subject: Re: Implementing setQueryTimeout() - round 2