From: | Kent Tong <kent(at)cpttm(dot)org(dot)mo> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | postgresql's MVCC implementation |
Date: | 2008-07-06 13:15:24 |
Message-ID: | 18302020.post@talk.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Susan Crayne | 2008-07-06 13:57:09 | Re: Installation problem -- another installation is in progress |
Previous Message | Martin Gainty | 2008-07-06 12:39:31 | Re: Installation problem -- another installation is in progress |