Created
April 11, 2014 13:01
-
-
Save aherok/10466934 to your computer and use it in GitHub Desktop.
display locking queries in pqsql. experimental.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
bl.transactionid, | |
bl.mode, | |
ka.query, | |
ka.query_start, | |
ka.state_change, | |
ka.state, | |
ka.pid | |
FROM pg_locks bl | |
JOIN pg_catalog.pg_locks kl ON kl.transactionid = bl.transactionid | |
JOIN pg_catalog.pg_stat_activity ka ON ka.pid = kl.pid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment