Skip to content

Instantly share code, notes, and snippets.

@bussiere
Created June 10, 2019 08:19
Show Gist options
  • Save bussiere/a5cda0b229c5e775ac8e73c886c3510a to your computer and use it in GitHub Desktop.
Save bussiere/a5cda0b229c5e775ac8e73c886c3510a to your computer and use it in GitHub Desktop.
Drop the Database Wub Wub
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = 'cadastre' AND pid <> pg_backend_pid();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment