I need exclusive access to a database. Is it possible using an SQL command to "detach" all other users from a postgres database. Or maybe closing all other connections and then gaining exclusive access.
This is for unit testing, and tests are only run manually, so there is no danger involved. Only old dead connections will be affected.
There are no other users connecting to these unittest databases.
The old dead connections come from developing. This happens all the time when a test that is being written or fails does not exit clean.
