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:

Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from

Leave a Reply

Be the First to Comment!

Notify of