[Info-ingres] ANSI + MVCC

Ingres Forums info-ingres at kettleriverconsulting.com
Tue Oct 27 09:24:05 UTC 2015


Hmm.

To answer your questions:

> if one transaction with RR isolation locks some pages/rows and MVCC
> tries to read those rows , will it read their state before the RR took
> place?
It depends on a number of factors, including the isolation level of the
session using MVCC (MVCC is not an isolation level). The session using
MVCC will see the state of the data as it was at the moment the
transaction started, or the moment the statement started, regardless of
what has happened since.
> 
> in the other case that the MVCC transaction tries to update those same
> rows that RR has already locked,will it cause a serialization error?
No. Both sessions give results correct for their chosen method of
isolation and their isolation level.

You can easily enough test it for yourself, though the syntax in your
original post wasn't quite right. It is SET LOCKMODE SESSION WHERE
LEVEL=MVCC.
> 
> and yet what happens in another case that MVCC is reading the rows and
> RR tries to get a lock on them for reading or updating?
It gets its lock and the update occurs.


-- 
rhann
------------------------------------------------------------------------
rhann's Profile: http://community.actian.com/forum/member.php?userid=131
View this thread: http://community.actian.com/forum/showthread.php?t=17740




More information about the Info-ingres mailing list