Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 45BDB2E004A for ; Tue, 19 Feb 2008 06:01:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 17521-06 for ; Tue, 19 Feb 2008 06:01:18 -0400 (AST) Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id 4E7CB2E0043 for ; Tue, 19 Feb 2008 06:01:16 -0400 (AST) Received: (qmail 16131 invoked by uid 1112); 19 Feb 2008 10:01:14 -0000 Date: Tue, 19 Feb 2008 05:01:14 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Oliver Jowett cc: PostgreSQL - JDBC , Tom Lane , Gregory Stark Subject: Re: Implementing setQueryTimeout() - round 2 In-Reply-To: <47BA5D9C.5050203@opencloud.com> Message-ID: References: <47B8E200.2020307@opencloud.com> <5350.1203299903@sss.pgh.pa.us> <47B8EB1C.8090802@opencloud.com> <87ejbao6bg.fsf@oxford.xeocode.com> <47BA2A6E.6050907@opencloud.com> <17814.1203384054@sss.pgh.pa.us> <47BA470A.8000904@opencloud.com> <19443.1203390470@sss.pgh.pa.us> <47BA491E.9090603@opencloud.com> <47BA5D9C.5050203@opencloud.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/149 X-Sequence-Number: 18356 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