From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pgbench: When using pipelining only do PQconsumeInput() when nec
Date: Thu, 05 Aug 2021 02:24:10 +0000
Message-ID: <E1mBT3K-00014L-GG@gemulon.postgresql.org> (raw)
pgbench: When using pipelining only do PQconsumeInput() when necessary.
Up to now we did a PQconsumeInput() for each pipelined query, asking the OS
for more input - which it often won't have, as all results might already have
been sent. That turns out to have a noticeable performance impact.
Alvaro Herrera reviewed the idea to add the PQisBusy() check, but not this
concrete patch.
Author: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/20210720180039.23rivhdft3l4mayn@alap3.anarazel.de
Backpatch: 14, where libpq/pgbench pipelining was introduced.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/87bff68840d542011ed8f60427502fb90fdf2873
Modified Files
--------------
src/bin/pgbench/pgbench.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
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: andres@anarazel.de
Subject: Re: pgsql: pgbench: When using pipelining only do PQconsumeInput() when nec
In-Reply-To: <E1mBT3K-00014L-GG@gemulon.postgresql.org>
References: <E1mBT3K-00014L-GG@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