Re: Implementing setQueryTimeout()

Поиск
Список
Период
Сортировка
Искать
От
Till Toenges
Тема
Re: Implementing setQueryTimeout()
Дата
Msg-id
47BA9284.5050407@kyon.de
Ответ на
Список
Дерево обсуждения
Implementing setQueryTimeout() Oliver Jowett <oliver@opencloud.com>
Re: Implementing setQueryTimeout() peter royal <peter.royal@pobox.com>
Re: Implementing setQueryTimeout() Tom Lane <tgl@sss.pgh.pa.us>
Re: Implementing setQueryTimeout() Oliver Jowett <oliver@opencloud.com>
Re: Implementing setQueryTimeout() Gregory Stark <stark@enterprisedb.com>
Re: Implementing setQueryTimeout() Oliver Jowett <oliver@opencloud.com>
Re: Implementing setQueryTimeout() Tom Lane <tgl@sss.pgh.pa.us>
Re: Implementing setQueryTimeout() Oliver Jowett <oliver@opencloud.com>
Re: Implementing setQueryTimeout() Tom Lane <tgl@sss.pgh.pa.us>
Re: Implementing setQueryTimeout() Oliver Jowett <oliver@opencloud.com>
Re: Implementing setQueryTimeout() - round 2 Oliver Jowett <oliver@opencloud.com>
Re: Implementing setQueryTimeout() - round 2 peter royal <peter.royal@pobox.com>
Re: Implementing setQueryTimeout() - round 2 Till Toenges <tt@kyon.de>
Re: Implementing setQueryTimeout() - round 2 Oliver Jowett <oliver@opencloud.com>
Re: Implementing setQueryTimeout() - round 2 Gregory Stark <stark@enterprisedb.com>
Re: Implementing setQueryTimeout() - round 2 Kris Jurka <books@ejurka.com>
Re: Implementing setQueryTimeout() - round 2 Michael Paesold <mpaesold@gmx.at>
Re: Implementing setQueryTimeout() Till Toenges <tt@kyon.de>
Re: Implementing setQueryTimeout() Oliver Jowett <oliver@opencloud.com>
Re: Implementing setQueryTimeout() Till Toenges <tt@kyon.de>
Re: Implementing setQueryTimeout() Oliver Jowett <oliver@opencloud.com>
Re: Implementing setQueryTimeout() Oliver Jowett <oliver@opencloud.com>
Re: Implementing setQueryTimeout() Till Toenges <tt@kyon.de>
Oliver Jowett wrote:
> setQueryTimeout() is documented as:
> 
>> Sets the number of seconds the driver will wait for a Statement object 
>> to execute to the given number of seconds. If the limit is exceeded, 
>> an SQLException is thrown.
> 
> That would seem to cover any sort of delay, not just "it is a slow query 
> on the server side". If the Statement can't execute in N seconds, return 
> an error. That could mean slow network - slow query - whatever.
> 
> I don't see why clients that want timeouts care about the cause of the 
> slowness -  all they care about is that they get control back within 
> some reasonable amount of time, surely? What's the use case where you 
> would use setQueryTimeout() but don't actually mean "give me control 
> back in N seconds"?

The documentation is unclear. But i think it is intended to limit the 
execution time on the server.

And i do care about the cause of the slowness. If i call 
setQueryTimeout(), i expect to be able to use the connection after a 
timeout, including everything i had SET before, prepared statements etc. 
A network timeout or anything worse is handled in an entirely different 
part of the code. That is not the responsibility of the driver, and 
doesn't event need to be part of the database related code at all.



Till
В списке pgsql-jdbc по дате отправления
От: Kris Jurka
Дата:
От: Oliver Jowett
Дата:
FAQ