Home Postgres
Post
Cancel

Postgres

Postgres

Force Delete Database in Postgres

1
2
3
4
5
6
ALTER DATABASE "jurta-test" WITH CONNECTION LIMIT 0;

SELECT pg_terminate_backend(sa.pid) FROM pg_stat_activity sa WHERE
sa.pid <> pg_backend_pid() AND sa.datname = 'jurta-test';

DROP DATABASE "jurta-test";
This post is licensed under CC BY 4.0 by the author.
Contents