pgsql: libpq: Reset singlerow flag correctly in pipeline mode - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: libpq: Reset singlerow flag correctly in pipeline mode
Date
Msg-id E1ojOAR-002MYO-BN@gemulon.postgresql.org
Whole thread Raw
List 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.laxalde@dalibo.com>
Discussion: https://postgr.es/m/01af18c5-dacc-a8c8-07ee-aecc7650c3e8@dalibo.com

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/27ca0bce5f41cecc3b219cc9d675239a79d7562a

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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Make some minor improvements in memory-context infrastructure.
Next
From: Andres Freund
Date:
Subject: pgsql: pgstat: Track time of the last scan of a relation