Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WYL9d-0003mz-RM for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Apr 2014 20:00:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WYL9d-0007v6-AL for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Apr 2014 20:00:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WYL9b-0007tc-Ot for pgsql-bugs@postgresql.org; Thu, 10 Apr 2014 20:00:55 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WYL9Y-0008Vj-Ge for pgsql-bugs@postgresql.org; Thu, 10 Apr 2014 20:00:55 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id E3C2428A2F; Thu, 10 Apr 2014 13:00:49 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id CE72AB34D8; Thu, 10 Apr 2014 13:00:49 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id 001A4C0058; Thu, 10 Apr 2014 13:00:42 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTPSA; Thu, 10 Apr 2014 13:00:41 -0700 (PDT) Message-ID: <5346F86E.7040406@vmware.com> Date: Thu, 10 Apr 2014 23:00:46 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 MIME-Version: 1.0 To: Peter Geoghegan , Tom Lane CC: Greg Stark , John R Pierce , PostgreSQL Bugs Subject: Re: log_checkpoints, microseconds References: <53463419.2090407@hogranch.com> <20785.1397157615@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.5 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 04/10/2014 10:43 PM, Peter Geoghegan wrote: > On Thu, Apr 10, 2014 at 12:20 PM, Tom Lane wrote: >> I think you're both wrong. 1000 usec = 1 msec, not the other way round. > > Yes, but why would you ever want to divide any number of microseconds > by 1000 like this, unless you were actually interested in nanoseconds? > The point is that we start out with microseconds "elapsed" here, not > milliseconds or seconds. Take a break, then take another look. The code first gets the number of microseconds elapsed. It wants to print it out in milliseconds. The question is: "How many milliseconds is X microseconds"? The answer is X / 1000. For comparison, imagine that you know that 180 minutes has elapsed, and you want to print that out in hours. To do that, you divide 180 by 60. - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs