pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: zam6ak@gmail.com, Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14838: clock_timestamp() returns same values for each row
Date: Fri, 29 Sep 2017 14:03:15 -0400
Message-ID: <10408.1506708195@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMkU=1wBg8EL3YdeW1tAciCYyFTVBBsYdqznRHG2U1=W4mFXjg@mail.gmail.com>
References: <20170929134321.28559.28353@wrigleys.postgresql.org>
	<CAMkU=1wBg8EL3YdeW1tAciCYyFTVBBsYdqznRHG2U1=W4mFXjg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Jeff Janes <jeff.janes@gmail.com> writes:
> On Fri, Sep 29, 2017 at 6:43 AM, <zam6ak@gmail.com> wrote:
>> We use clock_timestamp() function in our code and I have noticed that in PG
>> 10 RC1 it returns same values across rows...

> Probably not an issue of the different versions, but rather different
> compilers (or maybe different hardware?).

AFAICS, our code in this area (see src/port/gettimeofday.c) has not
changed since 9.5.  I'm suspicious of a platform change.

> I get the same behavior on these two versions:
> ...
> and that behavior is that the timestamp jumps 500 usec at a time, despite
> looking as if it might have usec granularity:

What gettimeofday.c does is to use GetSystemTimePreciseAsFileTime()
if it can get hold of that, otherwise fall back to
GetSystemTimeAsFileTime().  I don't see anything very specific in
Windows' documentation about the resolution to be expected from either
one, but I wonder if the OP's 9.6 installation is using the former
while for some reason his 10rc1 installation is using the latter.

			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 (5+ messages)  latest in thread

Message-ID: <10408.1506708195@sss.pgh.pa.us>
Permalink:  ../10408.1506708195@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10408.1506708195@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, jeff.janes@gmail.com
  Subject: Re: BUG #14838: clock_timestamp() returns same values for each row
  In-Reply-To: <10408.1506708195@sss.pgh.pa.us>
  References: <20170929134321.28559.28353@wrigleys.postgresql.org> <CAMkU=1wBg8EL3YdeW1tAciCYyFTVBBsYdqznRHG2U1=W4mFXjg@mail.gmail.com> <10408.1506708195@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