Created
July 2, 2019 15:27
-
-
Save armandfardeau/fc7332684e47ede7480ec4cdee9841f9 to your computer and use it in GitHub Desktop.
How to drop all connections to a specific database without stopping the server?
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 datname='db'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment