Re: Implementing setQueryTimeout()

Поиск
Список
Период
Сортировка
От peter royal
Тема Re: Implementing setQueryTimeout()
Дата
Msg-id 4861EBA5-2C56-476F-8A86-0567B2242E22@pobox.com
обсуждение исходный текст
Ответ на Implementing setQueryTimeout()  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
On Feb 17, 2008, at 5:40 PM, Oliver Jowett wrote:
> (1) Map query timeout to server-side statement_timeout. Add a
> timeout parameter to QueryExecutor methods. The protocol layer
> remembers the current setting of statement_timeout and issues an
> appropriate "SET statement_timeout" as necessary before submitting
> each query.
>
> Advantages: Gives nice failure characteristics (query is cancelled,
> connection remains usable)
> Disadvantages: Doesn't help with anything but slow queries on the
> server side, relies on server-side query cancellation due to timeout
> happening reasonably promptly. Client code that sets
> statement_timeout itself can confuse it.

i think this is a very reasonable approach. it seems like it should
handle the majority of the cases.

-pete


--
(peter.royal|osi)@pobox.com - http://fotap.org/~osi


Вложения

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Andres Olarte"
Дата:
Сообщение: Re: Getting "This ResultSet is closed" exceptions
Следующее
От: "Paul Tomblin"
Дата:
Сообщение: Re: Getting "This ResultSet is closed" exceptions