Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: postgresql'...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 15986 of 16965
Post > Topic >>

Re: postgresql's MVCC implementation

by tgl@[EMAIL PROTECTED] (Tom Lane) Jul 6, 2008 at 10:40 AM

Kent Tong <kent@[EMAIL PROTECTED]
> writes:
> 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.

If you want that to fail, use a SELECT FOR UPDATE at steps 3/4.

My interpretation of MVCC is that the above example isn't even
meaningful, because it assumes that "writing into Y" is an overwrite,
which it is not in Postgres --- that is, if T2 reads Y again, it'll
get the same value as before.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 5 Posts in Topic:
postgresql's MVCC implementation
kent@[EMAIL PROTECTED] (  2008-07-06 06:15:24 
Re: postgresql's MVCC implementation
tgl@[EMAIL PROTECTED] (T  2008-07-06 10:40:09 
Re: postgresql's MVCC implementation
kent@[EMAIL PROTECTED] (  2008-07-06 20:10:17 
Re: postgresql's MVCC implementation
tgl@[EMAIL PROTECTED] (T  2008-07-06 23:29:07 
Re: postgresql's MVCC implementation
kent@[EMAIL PROTECTED] (  2008-07-06 20:41:55 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 7:28:48 CDT 2008.