I am using pgbouncer with Django. I added the test_foo database to its configuration in order to be able to run tests because, apparently, Django cannot use a different port for the test database. Now a test run, but in the end, when Django tries to reset the test DB, I get
django.db.utils.DatabaseError: database "test_foo" is being accessed by other users DETAIL: There are 1 other session(s) using the database.
I assume this is caused by the open connection stored by pgbouncer. What can I do?
source share