]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix: wrap transaction in pipelines if the connection has one 298/head
authorDenis Laxalde <denis@laxalde.org>
Mon, 9 May 2022 19:14:59 +0000 (21:14 +0200)
committerDenis Laxalde <denis@laxalde.org>
Mon, 9 May 2022 19:24:13 +0000 (21:24 +0200)
commit9e671fe44fac55d78bc255efbac1f2b844401daf
tree97d238eef09b597ffe81ac167655ec2a9ecf5556
parent04fd1d3fcf8dc8f77218ff45d1c03aa98556678a
fix: wrap transaction in pipelines if the connection has one

When entering a transaction on a connection in pipeline mode, we open an
inner pipeline to ensure that a Sync is emitted at the end of
transaction thus restoring the connection in its expected state (i.e.
the same as in non-pipeline mode).
psycopg/psycopg/connection.py
psycopg/psycopg/connection_async.py
tests/test_pipeline.py
tests/test_pipeline_async.py