Created
March 28, 2018 15:28
-
-
Save pablomarti/80e5dee84a1e4eb229c126297039907f to your computer and use it in GitHub Desktop.
Postgres - Kill connections
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
SELECT pg_terminate_backend(pid) FROM pg_stat_activity | |
WHERE pid <> pg_backend_pid() AND datname = current_database(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment