Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxzds-0003pe-RO for pgsql-bugs@arkaria.postgresql.org; Fri, 29 Sep 2017 18:04:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dxzds-0003zK-E9 for pgsql-bugs@arkaria.postgresql.org; Fri, 29 Sep 2017 18:04:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dxzdA-0001Xj-GE for pgsql-bugs@postgresql.org; Fri, 29 Sep 2017 18:03:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dxzd7-0000pz-Ja for pgsql-bugs@postgresql.org; Fri, 29 Sep 2017 18:03:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v8TI3FAg010409; Fri, 29 Sep 2017 14:03:15 -0400 From: Tom Lane To: Jeff Janes cc: zam6ak@gmail.com, Pg Bugs Subject: Re: BUG #14838: clock_timestamp() returns same values for each row In-reply-to: References: <20170929134321.28559.28353@wrigleys.postgresql.org> Comments: In-reply-to Jeff Janes message dated "Fri, 29 Sep 2017 10:45:57 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10407.1506708195.1@sss.pgh.pa.us> Date: Fri, 29 Sep 2017 14:03:15 -0400 Message-ID: <10408.1506708195@sss.pgh.pa.us> 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 Jeff Janes writes: > On Fri, Sep 29, 2017 at 6:43 AM, 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