Re: tracking commit timestamps

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Steve Singer <steve(at)ssinger(dot)info>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Anssi K??ri?inen <anssi(dot)kaariainen(at)thl(dot)fi>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Subject: Re: tracking commit timestamps
Date: 2015-01-06 12:12:09
Message-ID: 54ABD119.2080208@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www

On 06/01/15 08:58, Michael Paquier wrote:
> On Fri, Dec 19, 2014 at 3:53 PM, Noah Misch <noah(at)leadboat(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2015-01-06 13:22:16 Re: TABLESAMPLE patch
Previous Message Magnus Hagander 2015-01-06 11:09:05 Re: SSL information view

Browse pgsql-www by date

  From Date Subject
Next Message Bruce Momjian 2015-01-06 17:59:01 Re: [DOCS] suggestion about SEO on www.postgresql.org/docs
Previous Message Michael Paquier 2015-01-06 07:58:14 Re: tracking commit timestamps