]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix(pool): more robust placement of reconnection attempts 1067/head
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 18 Oct 2025 15:48:32 +0000 (17:48 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 19 Oct 2025 01:32:16 +0000 (03:32 +0200)
commitb08410547a022d01654c6bdc7efe394c34e1ed5d
treec55b8c660229d9d571043cccbbaecb882b43c1c8
parent6b74a2d0f974b0daf6354240596f4017880af93d
fix(pool): more robust placement of reconnection attempts

The problem reported in #1176 is the close recursion already fixed.
However, because we try to reconnect before closing, we end up scheduling
a reconnection attempt for every recursion loop.

The recursion shouldn't happen anymore, but it seems more robust to
reconnect after the connection has been successfully closed, otherwise
we might end up requesting more connections than we ought (hopefully not
as dramatically as here anyway).
docs/news_pool.rst
psycopg_pool/psycopg_pool/pool.py
psycopg_pool/psycopg_pool/pool_async.py