Re: Postgresql MVCC, Read Committed Isolation Level and taking "snapshot"

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Postgresql MVCC, Read Committed Isolation Level and taking "snapshot"
Дата
Msg-id 20080520210425.GB84396@commandprompt.com
обсуждение исходный текст
Ответ на Re: Postgresql MVCC, Read Committed Isolation Level and taking "snapshot"  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Ответы Re: Postgresql MVCC, Read Committed Isolation Level and taking "snapshot"
Re: Postgresql MVCC, Read Committed Isolation Level and taking "snapshot"
Список pgsql-general
On Tue, May 20, 2008 at 08:56:41PM +0200, Ivan Sergio Borgonovo wrote:

> I just would like to have a coherent snapshot of some tables.

If you have a multi-statement transaction, then if you are in READ
COMMITTED you can see changes, and if you are in SERIALIZABLE you
can't.  You can't of course see changes "in the same statement" as it
were -- that's not meaningful (because either they committed before
you saw the row or after).

So,

> 1) check is some conditions are met with a bunch of selects and
> computation on returned rows
> 2) if everything is OK copy a "slice" of the snapshot in *other*
> tables.

This is more than one statement.  So you will be able to see changes
in between those statements.  If you don't care about that, then your
approach will work.

A

--
Andrew Sullivan
ajs@commandprompt.com
+1 503 667 4564 x104
http://www.commandprompt.com/

В списке pgsql-general по дате отправления:

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: best er modeling tool for postgreSQL
Следующее
От: johnduffy@f2s.com
Дата:
Сообщение: Re: pgxs question - linking c-functions to external libraries