The Open Source Swiss Army Knife

/sql_servers/
/sql_servers/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /sql_servers 
Permalink: transactions.txt
Title: add
article options : please login   |  raw source view  

read_committed and serializable modes

Imagine the following (this is a postgres example):
> What I've got is something like this:
> Session1> INSERT INTO Table VALUES(0);
> Session1> COMMIT;
> Session2> SELECT FROM Table;

> And Session2 is not gettint the values I've just commited.

but that can't be!

If the second transaction is in serializable mode, it won't see commits that
happened later than its own BEGIN. It will instead return an error, as the
results are not immediately available.

if the second transaction is in read_committed mode, it will not succeed in
getting a read until all values have been committed, so it waits until the
prior transaction is committed before it can do ANYTHING.


Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top