Re: Exposing the Xact commit order to the user

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Exposing the Xact commit order to the user
Дата
Msg-id 4BFBD4F00200002500031A79@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Exposing the Xact commit order to the user  (Florian Pflug <fgp@phlo.org>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: tsvector pg_stats seems quite a bit off.
Следующее
От: Dan Ports
Дата:
Сообщение: Re: Exposing the Xact commit order to the user