Re: tracking commit timestamps

From: Anssi Kääriäinen <anssi(dot)kaariainen(at)thl(dot)fi>
To: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(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-05 08:24:24
Message-ID: 1415175864.8931.55.camel@TTY32
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www

On Tue, 2014-11-04 at 23:43 -0600, Jim Nasby wrote:

> I'm worried about 2 commits in the same microsecond on the same
> system, not on 2 different systems. Or, put another way, if we're
> going to expose this I think it should also provide a guaranteed
> unique commit ordering for a single cluster. Presumably, this
> shouldn't be that hard since we do know the exact order in which
> things committed.

Addition of LSN when the timestamps for two transactions are exactly
same isn't enough. There isn't any guarantee that a later commit gets a
later timestamp than an earlier commit.

In addition, I wonder if this feature would be misused. Record
transaction ids to a table to find out commit order (use case could be
storing historical row versions for example). Do a dump and restore on
another cluster, and all the transaction ids are completely meaningless
to the system.

Having the ability to record commit order into an audit table would be
extremely welcome, but as is, this feature doesn't provide it.

- Anssi

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-11-05 09:26:47 Re: WAL format and API changes (9.5)
Previous Message Kyotaro HORIGUCHI 2014-11-05 08:19:58 Re: alter user/role CURRENT_USER

Browse pgsql-www by date

  From Date Subject
Next Message Michael Paquier 2014-11-05 12:10:59 Re: tracking commit timestamps
Previous Message Guillaume Lelarge 2014-11-05 06:09:15 Re: BUG #11872: row height is not quite tall eneough