Skip to content

Commit

Permalink
Change Postgres connection handling (#811)
Browse files Browse the repository at this point in the history
## Motivation and Context (Why the change? What's the scenario?)
ArgumentOutOfRangeException when trying to connect to Postgres.
See #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.
  • Loading branch information
marcominerva authored Sep 30, 2024
1 parent 4843f30 commit 414742c
Show file tree
Hide file tree
Showing 3 changed files with 291 additions and 267 deletions.
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="OllamaSharp" Version="3.0.8" />
<PackageVersion Include="Npgsql" Version="8.0.4" />
<PackageVersion Include="PdfPig" Version="0.1.8" />
<PackageVersion Include="Pgvector" Version="0.3.0" />
<PackageVersion Include="Polly.Core" Version="8.4.1" />
Expand Down
Loading

0 comments on commit 414742c

Please sign in to comment.