Re: Exposing the Xact commit order to the user - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Exposing the Xact commit order to the user
Date
Msg-id 4BFBD4F00200002500031A79@gw.wicourts.gov
Whole thread Raw
In response to Re: Exposing the Xact commit order to the user  (Florian Pflug <fgp@phlo.org>)
List pgsql-hackers
Florian Pflug <fgp@phlo.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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: tsvector pg_stats seems quite a bit off.
Next
From: Dan Ports
Date:
Subject: Re: Exposing the Xact commit order to the user