]> begriffs open source - ai-pg/blob - full-docs/txt/monitoring-locks.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / monitoring-locks.txt
1
2 27.3. Viewing Locks #
3
4    Another useful tool for monitoring database activity is the pg_locks
5    system table. It allows the database administrator to view information
6    about the outstanding locks in the lock manager. For example, this
7    capability can be used to:
8      * View all the locks currently outstanding, all the locks on
9        relations in a particular database, all the locks on a particular
10        relation, or all the locks held by a particular PostgreSQL session.
11      * Determine the relation in the current database with the most
12        ungranted locks (which might be a source of contention among
13        database clients).
14      * Determine the effect of lock contention on overall database
15        performance, as well as the extent to which contention varies with
16        overall database traffic.
17
18    Details of the pg_locks view appear in Section 53.13. For more
19    information on locking and managing concurrency with PostgreSQL, refer
20    to Chapter 13.