From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Till Toenges <tt(at)kyon(dot)de> |
Cc: | PostgreSQL - JDBC <pgsql-jdbc(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gregory Stark <stark(at)enterprisedb(dot)com> |
Subject: | Re: Implementing setQueryTimeout() - round 2 |
Date: | 2008-02-19 08:30:11 |
Message-ID: | 47BA9393.7090007@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Till Toenges | 2008-02-19 08:39:49 | Re: Implementing setQueryTimeout() |
Previous Message | Till Toenges | 2008-02-19 08:27:29 | Re: Implementing setQueryTimeout() - round 2 |