Last active
August 29, 2015 14:03
-
-
Save stuntgoat/77f7f06ca926e70fe292 to your computer and use it in GitHub Desktop.
Check long running queries and stop them if you want.
This file contains hidden or 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
;; Show long running queries. | |
SELECT pid, state, query_start, query FROM pg_stat_activity; | |
;; Kill a long running query. | |
SELECT pg_cancel_backend(<pid of the query from previous query>); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment