Skip to content

Instantly share code, notes, and snippets.

@daltonjorge
Created November 1, 2013 14:47
Show Gist options
  • Save daltonjorge/7266502 to your computer and use it in GitHub Desktop.
Save daltonjorge/7266502 to your computer and use it in GitHub Desktop.
Drop all connections to a specific postgresql database.
select pg_terminate_backend(procpid) 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