Readlock=nolock

From PTAGISWiki

Jump to: navigation, search

Readlock=Nolock & Isolation Levels

Summary:

If an installation is already using readlock=nolock everywhere, is the consistency of transaction processing different in any way if we reduce isolation_level from SERIALIZABLE to a lower level of isolation.

Problem:

Resolution:

Yes it would be different. The readlock = nolock changes the locking behavior for read cursors only. This will effectively lower the isolation level because it is then possible to do the same select twice and get different results. However the readlock=nolock does not affect the Ingres lock behavior for write cursors, whereas changing the isolation level would. If the isolation level is serializable, Ingres locking would provide phantom protection during updates. If you lower the isolation level, there would be no phantom protection during updates. e.g. If you are serializable and do update table where col = 5, Ingres locking would prevent another transaction from inserting any rows where col = 5.

Personal tools