fix: connect() never orphans a pool (psql-3)

connect() now closes an existing pool before re-connecting (no orphan on double-connect),
and tears down the freshly-built pool if the SELECT-1 validation fails before re-raising
(no leaked pool on a failed connect). verified vs embedded postgres. bump v0.1.1 -> v0.1.2

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
2026-07-01 00:28:27 -04:00
parent 426fad10ed
commit 4e75a800f1
3 changed files with 18 additions and 8 deletions
+3 -3
View File
@@ -10,18 +10,18 @@ a sibling of the `mongo` lib. Class is **`PsqlDB`**.
`requirements.txt`:
```
psql @ git+ssh://git@git.rethinkstudios.io/rethink-public/psql.git@v0.1.1
psql @ git+ssh://git@git.rethinkstudios.io/rethink-public/psql.git@v0.1.2
```
Direct:
```bash
pip install "psql @ git+ssh://git@git.rethinkstudios.io/rethink-public/psql.git@v0.1.1"
pip install "psql @ git+ssh://git@git.rethinkstudios.io/rethink-public/psql.git@v0.1.2"
```
Pulls `asyncpg`.
Drop the `@v0.1.1` suffix from the line above to install the latest unpinned.
Drop the `@v0.1.2` suffix from the line above to install the latest unpinned.
## The two-layer API