dbTalk Databases Forums  

shared intended exclusive locks

comp.databases.ingres comp.databases.ingres


Discuss shared intended exclusive locks in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
nikosv
 
Posts: n/a

Default shared intended exclusive locks - 07-18-2012 , 05:57 AM






Is there a way to indicate shared intended exclusive locks on page/row level (update locks) like locking hints or Select For Update ? I am not on MVCC and I'd would use it to avoid deadlocks in certain situations

Reply With Quote
  #2  
Old   
Ingres Forums
 
Posts: n/a

Default Re: shared intended exclusive locks - 07-18-2012 , 06:32 AM






If you're not using MVCC then pessimistic locking is all you have to
work with. In which case all you can do is SET LOCKMODE SESSION WHERE
READLOCK=EXCLUSIVE.

That'll be highly disruptive if you don't immediately revert to
READLOCK=SYSTEM as soon as you no longer need it.


--
rhann

Reply With Quote
  #3  
Old   
nikosv
 
Posts: n/a

Default Re: shared intended exclusive locks - 07-18-2012 , 08:56 AM



Quote:
SET LOCKMODE SESSION WHERE READLOCK=EXCLUSIVE.
does it take immediate effect or is it activated on the first select ?

Reply With Quote
  #4  
Old   
Ingres Forums
 
Posts: n/a

Default Re: shared intended exclusive locks - 07-18-2012 , 09:32 AM



It has to be issued outside the scope of a transaction (i.e. following a
commit or a rollback) so for practical purposes it takes effect on the
first query after you set it.


--
rhann

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.