Page set P-Locks

P-locks are used on physical objects stored in buffers (table spaces, index spaces, and partitions).

P-locks have complete partition independence: it is possible to have a P-lock on one partition of a page set and not on another. A P-lock on a page set does not necessarily mean that a P-lock exists on the corresponding index.

P-locks do not control concurrency but they do help Db2 track the level of interest in a particular page set or partition and determine the need for cache coherency controls.

P-locks differ from L-locks (transaction locks) in the following ways:
  • P-locks are owned by a member. After a P-lock is obtained for the subsystem, later transactions accessing the locked data do not have to incur the expense of physical locking.
  • The mode of a P-lock can be negotiated. If one member requests a P-lock that another member holds in an incompatible mode, the existing P-lock can be made less restrictive. The negotiation process usually involves registering pages or writing pages to the group buffer pool, and then downgrading the P-lock to a mode that is compatible with the new request.