Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk Operations for Postgres does not respect the PermanentTable setting #565

Open
rabberbock opened this issue Dec 20, 2023 · 2 comments
Open
Assignees

Comments

@rabberbock
Copy link

rabberbock commented Dec 20, 2023

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]
@JonathanMagnan JonathanMagnan self-assigned this Dec 20, 2023
@JonathanMagnan
Copy link
Member

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

@rabberbock
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants