Steps to reproduce
https://github.com/akilin/demos/tree/master/pg-multiplexing-pooling
run commands:
git clone https://github.com/akilin/demos
cd pg-multiplexing-pooling
docker-compose up -d
dotnet run
The issue
Hi, I wanted to try out Multiplexing that was released as part of 5.0.
Once I've added Multiplexing = true to my ConnectionStringBuilder - app started erroring when trying to Delete/Migrate a database.
Error message says that Pooling must be on to use multiplexing.. but pooling is on by default as far as I can tell.
I tried explicitly setting Pooling = true in code - but I am still getting same results.
Exception message: Pooling must be on to use multiplexing
Stack trace:
at Npgsql.NpgsqlConnectionStringBuilder.Validate()
at Npgsql.NpgsqlConnection.GetPoolAndSettings()
at Npgsql.NpgsqlConnection.set_ConnectionString(String value)
at Npgsql.NpgsqlConnection..ctor(String connectionString)
at Npgsql.NpgsqlConnection.CloneWith(String connectionString)
at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlDatabaseCreator.Exists()
at Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator.EnsureDeleted()
at Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade.EnsureDeleted()
at pg_multiplexing_pooling.Program.Main(String[] args) in C:\git\demos\pg-multiplexing-pooling\Program.cs:line 12
Further technical details
Npgsql version: 5.0.0
PostgreSQL version: latest docker image
Operating system: Windows 10
The issue seems to be happening because of next line:
https://github.com/npgsql/efcore.pg/blob/main/src/EFCore.PG/Storage/Internal/NpgsqlDatabaseCreator.cs#L136
Steps to reproduce
https://github.com/akilin/demos/tree/master/pg-multiplexing-pooling
run commands:
The issue
Hi, I wanted to try out Multiplexing that was released as part of 5.0.
Once I've added
Multiplexing = trueto my ConnectionStringBuilder - app started erroring when trying to Delete/Migrate a database.Error message says that Pooling must be
onto use multiplexing.. but pooling is on by default as far as I can tell.I tried explicitly setting
Pooling = truein code - but I am still getting same results.Further technical details
Npgsql version: 5.0.0
PostgreSQL version: latest docker image
Operating system: Windows 10
The issue seems to be happening because of next line:
https://github.com/npgsql/efcore.pg/blob/main/src/EFCore.PG/Storage/Internal/NpgsqlDatabaseCreator.cs#L136