Postgresql - unable to drop database because of some auto connections to DB
In my case, I am using AWS Redshift (based on Postgres). And it appears there are no other connections to the DB, but I am getting this same error. ERROR: database "XYZ" is being accessed by other users In my case, it seems the database cluster is still doing some processing on the database, and while there are no other external/user connections, the database is still internally in use.
https://stackoverflow.com/questions/17449420/postgresql-unable-to-drop-database-because-of-some-auto-connections-to-db