Last active
August 29, 2015 14:18
-
-
Save forgotpw1/4c2792a0c878d41c32ba to your computer and use it in GitHub Desktop.
Find out which database tables are locked
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 relation, transaction, pid, mode, granted, relname | |
FROM pg_locks | |
INNER JOIN pg_stat_user_tables | |
ON pg_locks.relation = pg_stat_user_tables.relid | |
WHERE pg_locks.pid='pid'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment