]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix: sync the pipeline on commit()
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 9 May 2022 00:57:05 +0000 (02:57 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 9 May 2022 01:10:54 +0000 (03:10 +0200)
commit666d2f8d5bc5d42f83ae807cacd0981635556f34
treedc89a2ebb65ae7bfa87e6b891465a9da383def83
parent773944be133e0269b60031f3645664c1f2f1cf0b
fix: sync the pipeline on commit()

This maintains the expectation that, after commit(), the operation is
really persisted. As per postgres pipeline docs:

    The client must not assume that work is committed when it sends a
    COMMIT — only when the corresponding result is received to confirm the
    commit is complete.

With this change we are effectively receiving the result of the commit,
eventually throwing an exception if it happened.

Close #296
docs/advanced/pipeline.rst
psycopg/psycopg/connection.py
tests/test_pipeline.py
tests/test_pipeline_async.py