Created
May 13, 2019 15:56
-
-
Save Nick011/e7759c44f52a3a8f648cffa1b7c2b635 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 a.datname, | |
l.relation::regclass, | |
l.transactionid, | |
l.mode, | |
l.GRANTED, | |
a.usename, | |
a.query, | |
a.query_start, | |
age(now(), a.query_start) AS "age", | |
a.pid | |
FROM pg_stat_activity a | |
JOIN pg_locks l ON l.pid = a.pid | |
ORDER BY a.query_start; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment