Skip to content

Instantly share code, notes, and snippets.

@jorgevilaca82
Created October 31, 2017 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorgevilaca82/1869658275a55a0b712293f0a88cf960 to your computer and use it in GitHub Desktop.
Save jorgevilaca82/1869658275a55a0b712293f0a88cf960 to your computer and use it in GitHub Desktop.
select pg_terminate_backend(pid)
from pg_stat_activity
where datname='dbname';
drop database if exists "dbname";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment