Re: tracking commit timestamps

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Anssi Kääriäinen <anssi(dot)kaariainen(at)thl(dot)fi>, Steve Singer <steve(at)ssinger(dot)info>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, 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: 2014-11-10 13:24:58
Message-ID: 5460BCAA.1050408@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www

On 10/11/14 08:01, Anssi Kääriäinen wrote:
> On Sun, 2014-11-09 at 11:57 -0500, Steve Singer wrote:
>
>> The reason why Jim and myself are asking for the LSN and not just the
>> timestamp is that I want to be able to order the transactions. Jim
>> pointed out earlier in the thread that just ordering on timestamp allows
>> for multiple transactions with the same timestamp.
>>
>> Maybe we don't need the entire LSN to solve that. If you already have
>> the commit timestamp maybe you only need another byte or two of
>> granularity to order transactions that are within the same microsecond.
>
> There is no guarantee that a commit with later LSN has a later
> timestamp. There are cases where the clock could move significantly
> backwards.
>
> A robust solution to storing transaction commit information (including
> commit order) in a way that can be referenced from other tables, can be
> loaded to another cluster, and survives crashes would be a great
> feature. But this feature doesn't have those properties.
>

It has the property of surviving crashes.

Not sure what you mean by referencing from other tables?

And about loading to another cluster, the txid does not really have any
meaning on another cluster, so the info about it does not have either?

But anyway this patch is targeting extensions not DBAs - you could write
extension that will provide that feature on top of this patch (although
given what I wrote above I don't see how it's useful).

--
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 Robert Haas 2014-11-10 13:25:30 Re: tracking commit timestamps
Previous Message Robert Haas 2014-11-10 13:20:31 Re: psql tab completion: \c [ dbname [ username ] ]

Browse pgsql-www by date

  From Date Subject
Next Message Robert Haas 2014-11-10 13:25:30 Re: tracking commit timestamps
Previous Message Anssi Kääriäinen 2014-11-10 07:01:06 Re: tracking commit timestamps