Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

shared intended exclusive locks

27 views
Skip to first unread message

nikosv

unread,
Jul 18, 2012, 6:57:29 AM7/18/12
to
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

Ingres Forums

unread,
Jul 18, 2012, 7:32:56 AM7/18/12
to

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
------------------------------------------------------------------------
rhann's Profile: http://community.actian.com/forum/member.php?userid=131
View this thread: http://community.actian.com/forum/showthread.php?t=14579

nikosv

unread,
Jul 18, 2012, 9:56:02 AM7/18/12
to
>SET LOCKMODE SESSION WHERE READLOCK=EXCLUSIVE.
does it take immediate effect or is it activated on the first select ?

Ingres Forums

unread,
Jul 18, 2012, 10:32:23 AM7/18/12
to

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.
0 new messages