Sample Header Ad - 728x90

Force drop db while others may be connected

258 votes
6 answers
448621 views
I need to remove a database from a PostgreSQL DB cluster. How can I do it even if there are active connections? I need sort of a -force flag, that will drop all connections and then the DB. How can I implement it? I'm using dropdb currently, but other tools are possible.
Asked by Alex (2775 rep)
Jan 30, 2012, 11:28 AM
Last activity: Feb 10, 2025, 09:43 PM