-
-
Notifications
You must be signed in to change notification settings - Fork 480
Open
Description
Bug Report
| Q | A |
|---|---|
| Version | >= 2.11.4 |
| Previous Version if the bug is a regression | 2.11.3 |
Summary
I'm now working with postgresql / pgbouncer. To reset my local database, I usually drop / create db with DropDatabaseDoctrineCommand and CreateDatabaseDoctrineCommand. But with pgbouncer, it seems that I can't do it anymore for the following reason:
- Since version 2.11.4, we have a test to check the instance of the platform =>
if ($connection->getDatabasePlatform() instanceof PostgreSQLPlatform) { - This line creates a connection between doctrine and pgbouncer, and so between pgbouncer and postgresql
- Then, a few lines below, we have
$connection->close();=> This closes the connection between doctrine and pgbouncer, but the connection between pgbouncer and postgresql is still open, so when we try to remove the db with$schemaManager->dropDatabase($name);, we have the following error:
Could not drop database "test" for connection named default
An exception occurred while executing a query: SQLSTATE[55006]: Object in use: 7 ERROR: database "test" is being accessed by other users
DETAIL: There is 1 other session using the database.
Isn't there another way to know the instance of the platform without connecting to db?
If no, would you suggest that I drop tables (and anything else) instead of db?
Thanks all :)
Current behavior
DropDatabaseDoctrineCommand doesn't work with pgbouncer
Expected behavior
DropDatabaseDoctrineCommand works with pgbouncer
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels