Re: BUG #14838: clock_timestamp() returns same values for each row

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: zam6ak(at)gmail(dot)com
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14838: clock_timestamp() returns same values for each row
Date: 2017-09-29 17:45:57
Message-ID: CAMkU=1wBg8EL3YdeW1tAciCYyFTVBBsYdqznRHG2U1=W4mFXjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Sep 29, 2017 at 6:43 AM, <zam6ak(at)gmail(dot)com> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 14838
> Logged by: zam zam
> Email address: zam6ak(at)gmail(dot)com
> PostgreSQL version: 10rc1
> Operating system: Windows 10
> Description:
>
> Hello
>
> We use clock_timestamp() function in our code and I have noticed that in PG
> 10 RC1 it returns same values across rows...
>
> Here is the output from 9.6 compare to 10rc1
>
> select version();
> -- "PostgreSQL 9.6.3, compiled by Visual C++ build 1800, 64-bit"
>
> -- "PostgreSQL 10rc1 on x86_64-pc-mingw64, compiled by gcc.exe (Rev5, Built
> by MSYS2 project) 4.9.2, 64-bit"
>
>
Probably not an issue of the different versions, but rather different
compilers (or maybe different hardware?).

I get the same behavior on these two versions:

PostgreSQL 9.6.5, compiled by Visual C++ build 1800, 64-bit
PostgreSQL 10rc1, compiled by Visual C++ build 1800, 64-bit

and that behavior is that the timestamp jumps 500 usec at a time, despite
looking as if it might have usec granularity:

2017-09-29 10:34:50.881312-07
2017-09-29 10:34:50.881312-07
2017-09-29 10:34:50.881312-07
2017-09-29 10:34:50.881312-07
2017-09-29 10:34:50.881312-07
2017-09-29 10:34:50.881812-07 <-- see here and above
2017-09-29 10:34:50.881812-07
2017-09-29 10:34:50.881812-07
2017-09-29 10:34:50.881812-07

You probably don't see the jump in your 2nd example because you didn't run
enough rows to cross a 500 usec boundary.

Cheers,

Jeff

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-09-29 18:03:15 Re: BUG #14838: clock_timestamp() returns same values for each row
Previous Message zam6ak 2017-09-29 13:43:21 BUG #14838: clock_timestamp() returns same values for each row