I read a description of MVCC in http://www.cs.ust.hk/~dimitris/CS530/L24.ppt
and
found that this isn't exactly what is implemented in PostgreSQL. For
example,
for a sequence of operations like:
1: T1 sets isolation to serializable & begins a transaction
2: T2 sets isolation to serializable & begins a transaction
3: T1 reads X into v1
4: T2 reads Y into v2
5: T1 writes v1 into Y
6: T2 writes v2 into X
7: T1 commits
8: T2 commits
Obviously, this sequence is also not a serializable execution. However, it
is allowed by
PostgreSQL. Moreover, according to the MVCC reference above, step 5 should
really
fail because the read timestamp of Y is that of T2, which is greater than
that of T1.
I understand that PostgreSQL doesn't implement predictive locking, but this
example
doesn't involve any phantom at all. It is plain multiversion timestamp
concurency control.
Any idea? Thanks in advance!
-----
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA
--
View this message in context: http://www.nabble.com/postgresql%27s-MVCC-implementation-tp18302020p18302020.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
No comments:
Post a Comment