Re: tracking commit timestamps - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: tracking commit timestamps
Date
Msg-id 54ABD119.2080208@2ndquadrant.com
Whole thread Raw
In response to Re: tracking commit timestamps  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On 06/01/15 08:58, Michael Paquier wrote:
> On Fri, Dec 19, 2014 at 3:53 PM, Noah Misch <noah@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



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: SSL information view
Next
From: Petr Jelinek
Date:
Subject: Re: TABLESAMPLE patch