]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix: fix Transaction commit in pipeline mode
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 9 May 2022 13:36:19 +0000 (15:36 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 9 May 2022 13:36:19 +0000 (15:36 +0200)
commit7a4061439d5987e1162e1f42110427e9902adc60
tree291eda5bf2b2908b17ead1c7bdbc13d30f740743
parent963a6f4f5584d941c63d5b8d85b79f34c1e4ebb1
fix: fix Transaction commit in pipeline mode

Make sure we receive the commit message, so we can raise an immediate
exception, as we do for connection-handled transactions.

Highlight, in the test, a behaviour difference between commit in
pipeline and non-pipeline mode. In the latter, after a failed commit,
the connection is left IDLE; in pipeline mode it is left INERROR so we
need a further rollback to keep on using it. Will look if this can be
made consistent.
psycopg/psycopg/transaction.py
tests/test_pipeline.py
tests/test_pipeline_async.py