Drop a PostgreSQL database if there are active connections to it
When you are trying to drop a PostgreSQL DB say "target_db" and you find error as below
postgres=# DROP DATABASE target_db; ERROR: database "target_db" is being accessed by other users DETAIL: There is 1 other session using the database. postgres=#
If you get above error then there 1 active connection opened to target_db, so it cannot delete the ...