Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id BD2FC2E0066 for ; Tue, 19 Feb 2008 12:34:11 -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 89278-01-4 for ; Tue, 19 Feb 2008 12:34:04 -0400 (AST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id C4A6B2E017A for ; Tue, 19 Feb 2008 12:22:45 -0400 (AST) Received: (qmail invoked by alias); 19 Feb 2008 16:22:44 -0000 Received: from office01.emerion.com (EHLO [127.0.0.1]) [83.64.50.26] by mail.gmx.net (mp042) with SMTP; 19 Feb 2008 17:22:44 +0100 X-Authenticated: #1946847 X-Provags-ID: V01U2FsdGVkX1/2etBkQ3321kMwc//TUZgp/zs/vQek3ceQFgiAG1 faM0SGmQaf4g9N Message-ID: <47BB0249.7070204@gmx.at> Date: Tue, 19 Feb 2008 17:22:33 +0100 From: Michael Paesold User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Kris Jurka CC: Oliver Jowett , PostgreSQL - JDBC , Tom Lane , Gregory Stark Subject: Re: Implementing setQueryTimeout() - round 2 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/150 X-Sequence-Number: 18357 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