On 12/19/2014 02:53 PM, Noah Misch wrote: > The test assumed that no two transactions of a given backend will get the same > timestamp value from now(). That holds so long as ticks of the system time > are small enough. Not so on at least some Windows configurations.
Most Windows systems with nothing else running will have 15 ms timer granularity. So multiple timestamps allocated within the same millisecond will have the same value for timestamps captured within that interval. If you're running other programs that use the multimedia timer APIs (including Google Chrome, MS SQL Server, and all sorts of other apps you might not expect) you'll probably have 1ms timer granularity instead. Since PostgreSQL 9.4 and below capture time on Windows using GetSystemTime the sub-millisecond part is lost anyway. On 9.5 it's retained but will usually be some fixed value because the timer tick is still 1ms. If you're on Windows 8 or Windows 2012 and running PostgreSQL 9.5 (master), but not earlier versions, you'll get sub-microsecond resolution like on sensible platforms. Some details here: https://github.com/2ndQuadrant/pg_sysdatetime -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers