Skip to content

Instantly share code, notes, and snippets.

@darrenrogan
Created April 7, 2020 07:16
Show Gist options
  • Save darrenrogan/2932d696f445da7f4343d3482d8680d5 to your computer and use it in GitHub Desktop.
Save darrenrogan/2932d696f445da7f4343d3482d8680d5 to your computer and use it in GitHub Desktop.
SELECT pg_terminate_backend(pid)
FROM pg_stat_activity
WHERE datname = 'mydb';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment