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

From Oliver Jowett
Subject Re: Implementing setQueryTimeout() - round 2
Date
Msg-id 47BA9393.7090007@opencloud.com
Whole thread Raw
In response to Re: Implementing setQueryTimeout() - round 2  (Till Toenges <tt@kyon.de>)
Responses Re: Implementing setQueryTimeout() - round 2  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-jdbc
Till Toenges wrote:
> Oliver Jowett wrote:
>> - 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
>
> I had to think about how you mean this. Doesn't this reduce to just one
> useful parameter, namely hardQueryMargin? If hardQueryMargin is set,
> then kill the connection after setQueryTimeout() + hardQueryMargin
> seconds? All other cases would be covered by setting appropriate values
> for these two.

The two Margins are there for applications that are not aware of the
extensions and just uses setQueryTimeout().

If your code is aware of the two timeouts, it can set them directly. Or
they can be set at the connection level and inherited by all users, even
ones that don't use setQueryTimeout at all.

> And i'm still not quite convinced that anything but "softQueryTimeout"
> should be implemented by the driver, but that's just my personal
> opinion. How about starting with the simple case (using set), and then
> see how it turns out in the real world?

The real world case I am dealing with needs the hardQueryTimeout
behaviour. If I'm going to implement anything first, it's that.

-O

pgsql-jdbc by date:

Previous
From: Till Toenges
Date:
Subject: Re: Implementing setQueryTimeout() - round 2
Next
From: Till Toenges
Date:
Subject: Re: Implementing setQueryTimeout()