Re: Implementing setQueryTimeout() - round 2

Поиск
Список
Период
Сортировка
От Michael Paesold
Тема Re: Implementing setQueryTimeout() - round 2
Дата
Msg-id 47BB0249.7070204@gmx.at
обсуждение исходный текст
Ответ на Re: Implementing setQueryTimeout() - round 2  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
Kris Jurka wrote:
> On Tue, 19 Feb 2008, Oliver Jowett wrote:
>
>> Add 4 new connection parameters, associated connection / statement
>> values and accessors on the postgresql extension interfaces:
>>
>> - softQueryTimeout: 0=disabled, >0 = timeout in ms, default 0
>> - hardQueryTimeout: 0=disabled, >0 = timeout in ms, default 0
>> - softQueryMargin: -1=disabled, >=0 = margin in ms, default 0
>> - hardQueryMargin: -1=disabled, >=0 = margin in ms, default 60s
>>
>> Any comments on this iteration? Too configurable? Not configurable
>> enough? Are the defaults sensible?
>>
>
> Sounds too configurable.  I don't understand the use case for
> softQueryMargin at all right now.  Since hardQueryTimeout +
> hardQueryMargin should be > softQueryTimeout + softQueryMargin for a
> reasonable configuration, we don't need all these parameters. Don't you
> just want:
>
> 1) defaultQueryTimeout: 0=disabled, >0 timeout in ms
> 2) hardTimeoutMargin: -1 disabled, >=0 hard timeout above query timeout

+1 from me, sounds easier to grasp, and looks like it would be
everything Oliver needs, too. Oliver?

setQueryTimeout() could by default only set "soft" timeout
(hardTimeoutMargin set to -1)

If hardTimeoutMargin is set to >= 0 you will get hard timeouts at
setQueryTimeout + margin. Margin can be 0 of course.

If you want to have soft/hard timeout for all queries, you set one or
both parameters.

Any use cases not working with just these two parameters?

Best Regards
Michael Paesold


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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Implementing setQueryTimeout() - round 2
Следующее
От: Paul Tomblin
Дата:
Сообщение: How to find what Java program has a transaction open?