Created
November 25, 2014 16:44
-
-
Save jnjcub/7516f1f01c923f6f00f2 to your computer and use it in GitHub Desktop.
How to delete stale session from postgres
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 pg_terminate_backend(pid) from pg_stat_activity where datname='dbname' | |
assuming all the sessions have to be terminated. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment