fix: transaction() releases the pooled connection when start() fails (psql-1)

_Transaction.__aenter__ acquired a connection then called tx.start(); if start() raised
(stale pooled conn after failover/idle-timeout — a fail-loud path), __aexit__ never ran so
the connection leaked, draining the pool until transaction() deadlocked on acquire(). now
release-on-failure. verified: 6 forced start-failures (2x pool) no longer exhaust the pool.
bump v0.1.0 -> v0.1.1

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
2026-06-30 21:04:43 -04:00
parent f12295ce6a
commit 426fad10ed
3 changed files with 14 additions and 6 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.0
psql @ git+ssh://git@git.rethinkstudios.io/rethink-public/psql.git@v0.1.1
```
Direct:
```bash
pip install "psql @ git+ssh://git@git.rethinkstudios.io/rethink-public/psql.git@v0.1.0"
pip install "psql @ git+ssh://git@git.rethinkstudios.io/rethink-public/psql.git@v0.1.1"
```
Pulls `asyncpg`.
Drop the `@v0.1.0` suffix from the line above to install the latest unpinned.
Drop the `@v0.1.1` suffix from the line above to install the latest unpinned.
## The two-layer API