PHP Manual

PEAR Manual

Smarty Manual

PostgreSQL

MySQL Manual

Perl Manual

24.3. viewing locks

another useful tool for monitoring database activity is the pg_locks system table. it allows the database administrator to view information about the outstanding locks in the lock manager. for example, this capability can be used to:

  • view all the locks currently outstanding, all the locks on relations in a particular database, all the locks on a particular relation, or all the locks held by a particular postgresql session.

  • determine the relation in the current database with the most ungranted locks (which might be a source of contention among database clients).

  • determine the effect of lock contention on overall database performance, as well as the extent to which contention varies with overall database traffic.

details of the pg_locks view appear in section 42.37. for more information on locking and managing concurrency with postgresql, refer to chapter 12.