]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix(pool): set the open flag before starting the maintenance tasks
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 19 Feb 2022 16:34:37 +0000 (17:34 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 19 Feb 2022 16:39:10 +0000 (17:39 +0100)
commit287ecf3f1bff3c39e92c25357d154ebc624ca075
tree10278c6ad302d77235215997cd461e88046ecfe2
parent3131f714bd202d163b0efd77b3a708aa08c274c6
fix(pool): set the open flag before starting the maintenance tasks

Failing to do so we might trigger the test in `MaintenanceTask.run()`
and find the pool closed, so discard the operation. It usually doesn't
happen, but with a few combination of IO operation it does happen: see
https://github.com/psycopg/psycopg/issues/230 for details.
docs/news_pool.rst
psycopg_pool/psycopg_pool/pool.py
psycopg_pool/psycopg_pool/pool_async.py