Created
March 6, 2014 00:19
-
-
Save l1x/9379580 to your computer and use it in GitHub Desktop.
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 locktype, relation::regclass, mode, transactionid AS tid, | |
virtualtransaction AS vtid, pid, granted | |
FROM pg_catalog.pg_locks l LEFT JOIN pg_catalog.pg_database db | |
ON db.oid = l.database WHERE (db.datname = 'sandbox' OR db.datname IS NULL) | |
AND NOT pid = pg_backend_pid(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SELECT * FROM pg_stat_activity;