pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: libpq: Reset singlerow flag correctly in pipeline mode
Date: Fri, 14 Oct 2022 17:08:16 +0000
Message-ID: <E1ojOAR-002MYO-BN@gemulon.postgresql.org> (raw)

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



view thread (3+ messages)

Message-ID: <E1ojOAR-002MYO-BN@gemulon.postgresql.org>
Permalink:  ../E1ojOAR-002MYO-BN@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ojOAR-002MYO-BN@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: libpq: Reset singlerow flag correctly in pipeline mode
  In-Reply-To: <E1ojOAR-002MYO-BN@gemulon.postgresql.org>
  References: <E1ojOAR-002MYO-BN@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox