pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@heroku.com>
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 15:20:15 -0400
Message-ID: <20785.1397157615@sss.pgh.pa.us> (raw)
In-Reply-To: <CAM3SWZT-tVb7Vk8RO98wq=1NHcrSWiC0dfatrKeEWPs-rkLLng@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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Peter Geoghegan <pg@heroku.com> writes:
> On Thu, Apr 10, 2014 at 11:45 AM, Greg Stark <stark@mit.edu> wrote:
>> I think his point is that to go from microseconds to msec (which I
>> think should just be "ms" btw) you want to multiply by 1000 not
>> divide.

> Right.

I think you're both wrong.  1000 usec = 1 msec, not the other way round.

> Or just use the INSTR_TIME_GET_MILLISEC() macro to begin with,
> and do neither.

The code appears to be trying to track stats at the microsecond
level.  The printout is following a policy decision that we prefer
to report units of msec, but that does not mean that we shouldn't
keep microsecond precision internally.

In short, I see nothing that needs fixed here.

			regards, tom lane


-- 
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: <20785.1397157615@sss.pgh.pa.us>
Permalink:  ../20785.1397157615@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20785.1397157615@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, pg@heroku.com, stark@mit.edu, pierce@hogranch.com
  Subject: Re: log_checkpoints, microseconds
  In-Reply-To: <20785.1397157615@sss.pgh.pa.us>
  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>

* 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