|
|||||
| | |||||
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 |