Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: table locking question
ctcgag_at_hotmail.com wrote in message news:<20030203190729.048$bf_at_newsreader.com>...
> I think this was actually a row locking question despite the
> subject line, but...
>
>> This suggests to me that if a process encounters a row locked by a
Hi Xho,
Frankly, I do not know the exact algorithm which Oracle uses. I know
that Oracle/PMON will keep the lock until the transaction on the
locked row(s) is rolled back.
Let's say one transaction contains 100 update statements, each one
updating ,say , one row. It has issued 50 of these updates without
committing them.
The connection dies, PMON sees this and it starts to rollback. Now, it
can't release any of the locks, since though they are obtained through
50 single update statements, they are all part of this single
transaction.
Thus releasing the lock on just some of the rows could violate read consistency. So even though PMON *physically* has rolled back 99 of the update statements, it still has to keep the lock on all 100 rows until completely done.
This is my understanding. It could be wrong. Any other views on this interesting subject ?
![]() |
![]() |