Skip to content

Commit 414742c

Browse files
authored
Change Postgres connection handling (#811)
## Motivation and Context (Why the change? What's the scenario?) ArgumentOutOfRangeException when trying to connect to Postgres. See https://github.com/microsoft/kernel-memory/issues/789 ## High level description (Approach, Design) Change connection handling in `PostgresDbClient` ensuring that the `NpgsqlDataSource` is disposed only when the work with the connection is done.
1 parent 4843f30 commit 414742c

File tree

3 files changed

+291
-267
lines changed

3 files changed

+291
-267
lines changed

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<PackageVersion Include="Moq" Version="4.20.72" />
4343
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
4444
<PackageVersion Include="OllamaSharp" Version="3.0.8" />
45+
<PackageVersion Include="Npgsql" Version="8.0.4" />
4546
<PackageVersion Include="PdfPig" Version="0.1.8" />
4647
<PackageVersion Include="Pgvector" Version="0.3.0" />
4748
<PackageVersion Include="Polly.Core" Version="8.4.1" />

0 commit comments

Comments
 (0)