Bulk Operations for Postgres does not respect the PermanentTable setting
Description
I would like Bulk operations to use a non temporary table for all Bulk Operations (to avoid connection pinning). However enabling this option either globally or per operation does not seem to have an effect.
Logs
CREATE TEMP TABLE ZZZProjects_468d3c9c_c5c1_4e54_badc_9aee50110677 AS SELECT etc....
Code
await applicationContext.BulkInsertAsync(users, opt => opt.UsePermanentTable = true);
or
EntityFrameworkManager.BulkOperationBuilder = options =>
{
options.UsePermanentTable = true;
};
Is this expected for Postgres? Is there any alternative.
Thanks!
Further technical details
- EF version: [EF Core v7.0.3]
- EF Extensions version: [EFE Core v7.18.5]
- Database Server version: [Postgres 14]
- Database Provider version (NuGet): [Npgsql.EntityFrameworkCore.PostgreSQL v7.0.3]
Hello @rabberbock ,
Thank you for reporting. This option is not yet supported for PostgreSQL so that is "expected".
We will try to add the support to it if possible.
Best Regards,
Jon
@JonathanMagnan Thanks for the update! I am actually seeing something else creating the session pinning, so will open up another issue for that. But yep, it would be nice to be able to customize that for Postgres as well.