Skip to content

Instantly share code, notes, and snippets.

@gcimmino
Created October 30, 2014 08:43
Show Gist options
  • Save gcimmino/059beba4a52e3a356c48 to your computer and use it in GitHub Desktop.
Save gcimmino/059beba4a52e3a356c48 to your computer and use it in GitHub Desktop.
Postgresql drop all sessions
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = 'hachette_development' AND pid <> pg_backend_pid();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment