From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Matthieu Garrigues <matthieu.garrigues@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Dave Cramer <davecramer@postgres.rocks>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Craig Ringer <craig@2ndquadrant.com>
Cc: Vaishnavi Prabakaran <vaishnaviprabakaran@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Claudio Freire <klaussfreire@gmail.com>
Cc: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Subject: Re: PATCH: Batch/pipelining support for libpq
Date: Wed, 18 Nov 2020 14:51:34 -0300
Message-ID: <20201118175134.GA30739@alvherre.pgsql> (raw)
In-Reply-To: <b27523b8-6e41-44e8-8cc6-ea136316cdcd@manitou-mail.org>
On 2020-Nov-14, Daniel Verite wrote:
> The patch I posted in [1] was pretty simple, but at the time, query
> results were always discarded. Now that pgbench can instantiate
> variables from query results, a script can do:
> select 1 as var \gset
> select :var;
> This kind of sequence wouldn't work in batch mode since it
> sends queries before getting results of previous queries.
>
> So maybe \gset should be rejected when inside a batch section.
Hah.
Hacking pgbench extensively is beyond what I'm willing to do for this
feature at this time. Making \gset rejected in a batch section sounds
simple enough and supports \beginbatch et al sufficiently to compare
performance, so I'm OK with a patch that does that. That'd be a small
extension to your previous patch, if I understand correctly.
If you or others want to send patches to extend batch support with
read-write tracking for variables, feel free, but I hereby declare that
I'm not taking immediate responsibility for getting them committed.
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, daniel@manitou-mail.org, david.g.johnston@gmail.com, matthieu.garrigues@gmail.com, michael@paquier.xyz, davecramer@postgres.rocks, craig@2ndquadrant.com, vaishnaviprabakaran@gmail.com, andres@anarazel.de, michael.paquier@gmail.com, klaussfreire@gmail.com, heikki.linnakangas@iki.fi
Subject: Re: PATCH: Batch/pipelining support for libpq
In-Reply-To: <20201118175134.GA30739@alvherre.pgsql>
* 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