PostgreSQL: Script to find information about the Locks held by Open Transactions (pg_locks)

In this post, I am sharing one script to find information about the Locks which are held by Open Transactions of PostgreSQL Database Server.

Database Theory: What is Timeout, Lock, Block, and Deadlock in a Database System?

PostgreSQL view pg_locks contains the main information about the all types of lock of Database Server.
It contains one row per active lockable object.

This script is very helpful to all PostgreSQL Database Administrators.

Below is a script:

Anvesh Patel

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz