From: Daniele Varrazzo Date: Sat, 7 May 2022 14:53:34 +0000 (+0200) Subject: docs: document that now rollback issues a sync point X-Git-Tag: 3.1~120^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01ba55a78d1418ac43cb50a0dbebfd5237476ecb;p=thirdparty%2Fpsycopg.git docs: document that now rollback issues a sync point --- diff --git a/docs/advanced/pipeline.rst b/docs/advanced/pipeline.rst index 06373b334..7f01d17aa 100644 --- a/docs/advanced/pipeline.rst +++ b/docs/advanced/pipeline.rst @@ -20,9 +20,8 @@ buffered on the server side; the server flushes that buffer when a *synchronization point* is established. If any statement encounters an error, the server aborts the current transaction and does not execute any subsequent command in the queue until the next synchronization point; a -`~errors.PipelineAborted` exception is raised for each such command (including -a `~Connection.rollback()`). Query processing resumes after the -synchronization point. +`~errors.PipelineAborted` exception is raised for each such command. Query +processing resumes after the synchronization point. Pipeline mode is most useful when the server is distant, i.e., network latency (“ping time”) is high, and also when many small operations are being performed @@ -57,7 +56,8 @@ output buffer. This flush can happen either when a synchronization point is established by Psycopg: -- using the `Pipeline.sync()` method, or, +- using the `Pipeline.sync()` method, +- on `~Connection.rollback()`, - at the end of a `!Pipeline` block; or using a fetch method such as `Cursor.fetchone()`.