Re: Exposing the Xact commit order to the user

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Dan Ports" <drkp(at)csail(dot)mit(dot)edu>,"Florian Pflug" <fgp(at)phlo(dot)org>
Cc: "Nicolas Barbier" <nicolas(dot)barbier(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-25 18:47:28
Message-ID: 4BFBD4F00200002500031A79@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Florian Pflug <fgp(at)phlo(dot)org> wrote:

> Hm, so in fact SSI sometimes allows the database to be
> inconsistent, but only as long as nobody tries to observe it?

Not exactly. The eventually-persisted state is always consistent,
but there can be a transitory committed state which would violate
user-defined constraints or business rules *if viewed*. This is
what I've been on about -- the commit sequence is not necessarily
the same as the apparent order of execution. A read-only
transaction, if run before the overlapping commits "settle", can
view a state which is not consistent with any serial order of
execution, and might therefore break the rules. SSI detects that
and rolls one of the transactions back if they're all running at
serializable transaction isolation in a single SSI database, but the
question is how to handle this when the read happens in a replica.

> Btw, I still don't get how this follows from the Cahill paper. For
> a transaction to lie on a dangerous circle, it needs incoming and
> outgoing edges in the conflict graph, right?

At least one of the transactions participating in the cycle does.
There's no requirement that they all do.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dan Ports 2010-05-25 18:48:44 Re: Exposing the Xact commit order to the user
Previous Message Alvaro Herrera 2010-05-25 18:44:29 Re: tsvector pg_stats seems quite a bit off.