On 06/01/15 08:58, Michael Paquier wrote:
On Fri, Dec 19, 2014 at 3:53 PM, Noah Misch <n...@leadboat.com> wrote:
localhost template1=# select clock_timestamp(), pg_sleep(.1 * (n % 2)) from 
generate_series(0,7) t(n);
         clock_timestamp        | pg_sleep
-------------------------------+----------
  2014-12-18 08:34:34.522126+00 |
  2014-12-18 08:34:34.522126+00 |
  2014-12-18 08:34:34.631508+00 |
  2014-12-18 08:34:34.631508+00 |
  2014-12-18 08:34:34.74089+00  |
  2014-12-18 08:34:34.74089+00  |
  2014-12-18 08:34:34.850272+00 |
  2014-12-18 08:34:34.850272+00 |
(8 rows)
So, we would need additional information other than the node ID *and*
the timestamp to ensure proper transaction commit ordering on Windows.
That's not cool and makes this feature very limited on this platform.


Well that's Windows time api for you, it affects everything that deals with timestamps though, not just commit ts. Note that the precision depends on hardware and other software that was running on the computer (there is undocumented api to increase the resolution, also use of multimedia timer increases resolution, etc).

The good news is that MS provides new high precision time API in Windows 8 and Windows Server 2012 which we are using thanks to 519b0757a37254452e013ea0ac95f4e56391608c so we are good at least on modern systems.

--
 Petr Jelinek                  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

Reply via email to