Subject Re: [firebird-support] Re: reading fb_lock_print report
Author Ann W. Harrison
Anderson Farias wrote:

>> That particular Owner has 103 requests for locks. At least 102 of
>> them are granted.
> why do you say 'at least 102 are granted' (where do you see that)?

Ah. That's something that I know. An owner never has more than one
open request for a lock.

> and, what exactly is a 'request for lock granted'? it means this
> owner has 102 records locked?

No. Firebird doesn't lock records. However, it does lot lots of
other things, some using traditional two-phase locking and some using
what are now generally called "latches". Two-phase locks are acquired
as a transaction runs and released only when the transaction ends.
"Latches" are taken and released as needed. When Firebird is reading
a page in the cache on behalf of a transaction, it gets a read latch
on that page. When it changes a page, it must get a write latch on
the page. It also gets shared locks on tables and indexes that are
in use so they won't be dropped, etc.