pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Peter Geoghegan <pg@heroku.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <stark@mit.edu>
Cc: John R Pierce <pierce@hogranch.com>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: log_checkpoints, microseconds
Date: Thu, 10 Apr 2014 23:00:46 +0300
Message-ID: <5346F86E.7040406@vmware.com> (raw)
In-Reply-To: <CAM3SWZTJQK0tBEMTqetyOHAe50fnD56S3Lmr=NQRzy2pjF7E+g@mail.gmail.com>
References: <CAM3SWZSeqmy7YP71uZuYHiiRWXz_UTNF3GxSPAzE9mUH3c5d0w@mail.gmail.com>
	<53463419.2090407@hogranch.com>
	<CAM-w4HPNdfivUqROG5T-zEr8+kLsgTX-fChiX5dXdfYP+hGwhg@mail.gmail.com>
	<CAM3SWZT-tVb7Vk8RO98wq=1NHcrSWiC0dfatrKeEWPs-rkLLng@mail.gmail.com>
	<20785.1397157615@sss.pgh.pa.us>
	<CAM3SWZTJQK0tBEMTqetyOHAe50fnD56S3Lmr=NQRzy2pjF7E+g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 04/10/2014 10:43 PM, Peter Geoghegan wrote:
> On Thu, Apr 10, 2014 at 12:20 PM, Tom Lane <tgl@sss.pgh.pa.us> 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



view thread (13+ messages)  latest in thread

Message-ID: <5346F86E.7040406@vmware.com>
Permalink:  ../5346F86E.7040406@vmware.com/
Also on:    postgresql.org/message-id/5346F86E.7040406@vmware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: hlinnakangas@vmware.com, pg@heroku.com, tgl@sss.pgh.pa.us, stark@mit.edu, pierce@hogranch.com
  Subject: Re: log_checkpoints, microseconds
  In-Reply-To: <5346F86E.7040406@vmware.com>
  References: <CAM3SWZSeqmy7YP71uZuYHiiRWXz_UTNF3GxSPAzE9mUH3c5d0w@mail.gmail.com> <53463419.2090407@hogranch.com> <CAM-w4HPNdfivUqROG5T-zEr8+kLsgTX-fChiX5dXdfYP+hGwhg@mail.gmail.com> <CAM3SWZT-tVb7Vk8RO98wq=1NHcrSWiC0dfatrKeEWPs-rkLLng@mail.gmail.com> <20785.1397157615@sss.pgh.pa.us> <CAM3SWZTJQK0tBEMTqetyOHAe50fnD56S3Lmr=NQRzy2pjF7E+g@mail.gmail.com> <5346F86E.7040406@vmware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox