I'm looking for a way to kill all existing connections to a database I messed up. I'm attempting to kill a specific database in PostgreSQL 9.1 & I'm getting the following error:
postgres=# DROP DATABASE calendar;
ERROR: database "calendar" is being accessed by other users
DETAIL: There are 6 other session(s) using the database.
Is there a correct manner in which I should be killing these zombie connections? Nobody should be connected to this database server but me. I think these are orphaned connections from a web browser attempting to initialize the database via a web installer for a calendar application.
Can someone please explain how I can successfully blast / remove this database from my cluster?