From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: libpq: Reset singlerow flag correctly in pipeline mode |
Date: | 2022-10-14 17:08:16 |
Message-ID: | E1ojOAR-002MYN-Ar@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
libpq: Reset singlerow flag correctly in pipeline mode
When a query whose results were requested in single-row mode is the last
in the queue by the time those results are being read, the single-row
flag was not being reset, because we were returning early from
pqPipelineProcessQueue. Move that stanza up so that the flag is always
reset at the end of sending that query's results.
Add a test for the situation.
Backpatch to 14.
Author: Denis Laxalde <denis(dot)laxalde(at)dalibo(dot)com>
Discussion: https://postgr.es/m/01af18c5-dacc-a8c8-07ee-aecc7650c3e8@dalibo.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/db1b931a4ee885ebd27bb5b335c1e461ccc34bbe
Modified Files
--------------
src/interfaces/libpq/fe-exec.c | 12 +++---
src/test/modules/libpq_pipeline/libpq_pipeline.c | 45 +++++++++++++++++++++-
.../modules/libpq_pipeline/traces/singlerow.trace | 20 ++++++++++
3 files changed, 70 insertions(+), 7 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-10-14 18:14:41 | pgsql: Have GetCurrentTransactionStopTimestamp() set xactStopTimestamp |
Previous Message | Tom Lane | 2022-10-14 16:36:28 | pgsql: Make some minor improvements in memory-context infrastructure. |