select pg_terminate_backend(pid)
from pg_stat_activity
where datname = 'doomed_database'
Created
January 23, 2018 10:28
-
-
Save willm/5caf1d3bd5210a82362e1bdbcc1f7c1a to your computer and use it in GitHub Desktop.
Postgres cheat sheet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment