Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D5E90476B0F for ; Wed, 25 Sep 2002 20:54:16 -0400 (EDT) Received: from joeconway.com (unknown [63.210.180.150]) by postgresql.org (Postfix) with ESMTP id 40F2D476B0C for ; Wed, 25 Sep 2002 20:54:16 -0400 (EDT) Received: from [206.19.64.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 3.5.9) with ESMTP-TLS id 1337870; Wed, 25 Sep 2002 17:32:58 -0700 Message-ID: <3D925A4D.8030201@joeconway.com> Date: Wed, 25 Sep 2002 17:52:29 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: pgsql-hackers Subject: Re: compiling client utils under win32 - current 7.3devel References: <3D9232F7.9090001@joeconway.com> <28598.1032992300@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/1497 X-Sequence-Number: 29454 Tom Lane wrote: > It might work to measure time since the start of the whole process, or > until the timeout target, rather than accumulating adjustments to the > "remains" count each time through. In other words something like > > at start: targettime = time() + specified-timeout > > each time we are about to wait: set select timeout to > targettime - time(). > > This bounds the error at 1 second which is probably good enough (you > might want to add 1 to targettime to ensure the error is in the > conservative direction of not timing out too soon). > I was working with this approach, when I noticed on *unmodified* cvs tip (about a day old): test=# set statement_timeout=1; SET test=# \dt ERROR: Query was cancelled. test=# At: http://developer.postgresql.org/docs/postgres/runtime-config.html#LOGGING the setting is described like this: "STATEMENT_TIMEOUT (integer) Aborts any statement that takes over the specified number of milliseconds. A value of zero turns off the timer." The proposed change will take this to a 1 second granularity anyway, so I was thinking we should change the setting to have a UOM of seconds, and fix the documentation. Any comments or concerns with regard to this plan? Thanks, Joe