Re: Implementing setQueryTimeout() - round 2

From: Kris Jurka <books(at)ejurka(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
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 10:01:14
Message-ID: Pine.BSO.4.64.0802190453130.8772@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michael Paesold 2008-02-19 16:22:33 Re: Implementing setQueryTimeout() - round 2
Previous Message Gregory Stark 2008-02-19 09:46:28 Re: Implementing setQueryTimeout() - round 2