Created
June 11, 2016 18:47
-
-
Save david-pm/077642d9c5e83ef27e9499ad0a725904 to your computer and use it in GitHub Desktop.
See how many active connections there are to postgresql
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 count(*) | |
FROM pg_stat_activity | |
WHERE pid != pg_backend_pid() | |
AND usename = current_user; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment