Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx
+1 503 667 4564 x104
http://www.commandprompt.com/


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux