Re: Exposing the Xact commit order to the user

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: robertmhaas(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org, JanWieck(at)yahoo(dot)com
Subject: Re: Exposing the Xact commit order to the user
Date: 2010-05-24 17:11:16
Message-ID: 4BFAB334.5090705@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 24/05/10 19:51, Kevin Grittner wrote:
> The only thing I'm confused about is what benefit anyone expects to
> get from looking at data between commits in some way other than our
> current snapshot mechanism. Can someone explain a use case where
> what Jan is proposing is better than snapshot isolation? It doesn't
> provide any additional integrity guarantees that I can see.

Right, it doesn't. What it provides is a way to reconstruct a snapshot
at any point in time, after the fact. For example, after transactions A,
C, D and B have committed in that order, it allows you to reconstruct a
snapshot just like you would've gotten immediately after the commit of
A, C, D and B respectively. That's useful replication tools like Slony
that needs to commit the changes of those transactions in the slave in
the same order as they were committed in the master.

I don't know enough of Slony et al. to understand why that'd be better
than the current heartbeat mechanism they use, taking a snapshot every
few seconds, batching commits.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-05-24 17:12:21 Re: [PATCH] Move 'long long' check to c.h
Previous Message Kevin Grittner 2010-05-24 16:51:02 Re: Exposing the Xact commit order to the user