Skip to content

.Net: Optimize and clean up the PgVector provider #12441

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

Merged
merged 1 commit into from
Jun 19, 2025

Conversation

roji
Copy link
Member

@roji roji commented Jun 10, 2025

  • Removed the intermediate Dictionary<string, object?> in serialization/deserialization. Like with SQL Server and SQLite, we now deserialize directly from NpgsqlDataReader, etc.
  • Removed PostgresSqlCommandInfo, which was basically the same thing as NpgsqlCommand. Code now simply instantiates NpgsqlCommand directly, instead of instantiating PostgresSqlCommandInfo and then creating an NpgsqlCommand from that.
  • Removed PostgresDbClient - command creation is now done in PostgresCollection directly (actual SQL is still generated PostgresSqlBuilder for unit testing, at least for now).
  • Moved the reference-counting functionality of PostgresDbClient to a minimal NpgsqlDataSourceArc ("atomic reference counter"), which does only this.
  • Various other minor cleanups.

Closes #11123

@roji roji requested a review from a team as a code owner June 10, 2025 19:03
@markwallace-microsoft markwallace-microsoft added the .NET Issue or Pull requests regarding .NET code label Jun 10, 2025
@github-actions github-actions bot changed the title Optimize and clean up the PgVector provider .Net: Optimize and clean up the PgVector provider Jun 10, 2025
@roji roji temporarily deployed to integration June 10, 2025 19:03 — with GitHub Actions Inactive
@roji roji added this pull request to the merge queue Jun 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 18, 2025
@roji roji force-pushed the OptimizePgVector branch from 0e1bf0b to d8cc0d1 Compare June 18, 2025 17:14
@roji roji enabled auto-merge June 18, 2025 17:14
@roji roji temporarily deployed to integration June 18, 2025 17:15 — with GitHub Actions Inactive
@roji roji added this pull request to the merge queue Jun 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 18, 2025
@roji roji added this pull request to the merge queue Jun 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 18, 2025
@roji roji added this pull request to the merge queue Jun 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 18, 2025
@roji roji added this pull request to the merge queue Jun 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 19, 2025
@markwallace-microsoft
Copy link
Member

Unrelated integration test failure

[xUnit.net 00:02:09.98]     SemanticKernel.IntegrationTests.Connectors.AzureOpenAI.AzureOpenAIChatClientRequiredFunctionChoiceBehaviorTests.SpecifiedInPromptInstructsConnectorToInvokeKernelFunctionAutomaticallyAsync [FAIL]
[xUnit.net 00:02:09.98]       Polly.Timeout.TimeoutRejectedException : The operation didn't complete within the allowed timeout of '00:00:30'.
[xUnit.net 00:02:09.98]       ---- System.Threading.Tasks.TaskCanceledException : The operation was canceled.
[xUnit.net 00:02:09.98]       -------- System.IO.IOException : Unable to read data from the transport connection: Operation canceled.
[xUnit.net 00:02:09.98]       ------------ System.Net.Sockets.SocketException : Operation canceled

@markwallace-microsoft markwallace-microsoft merged commit 4c71386 into microsoft:main Jun 19, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.Net: [MEVD] Stop serializing to intermediate type in relational connectors
5 participants