From: Daniel Verite <daniel@manitou-mail.org>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Vaishnavi Prabakaran <vaishnaviprabakaran@gmail.com>
Cc: Prabakaran, Vaishnavi <VaishnaviP@fast.au.fujitsu.com>
Cc: Craig Ringer <craig@2ndquadrant.com>
Cc: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>
Cc: Dmitry Igrishin <dmitigr@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Manuel Kniep <m.kniep@web.de>
Cc: fujita.etsuro@lab.ntt.co.jp <fujita.etsuro@lab.ntt.co.jp>
Cc: Iwata, Aya <iwata.aya@jp.fujitsu.com>
Subject: Re: PATCH: Batch/pipelining support for libpq
Date: Tue, 28 Mar 2017 15:28:52 +0200
Message-ID: <5f3810de-df50-49a2-82fa-b95111ef2bbd@manitou-mail.org> (raw)
In-Reply-To: <CAB7nPqQOu8Ta2sBLwXm6eNZ9XignVz3wJLfLfm3HrzQOofY1aQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Michael Paquier wrote:
> # Running: testlibpqbatch dbname=postgres 10000 copyfailure
> dispatching SELECT query failed: cannot queue commands during COPY
>
> COPYBUF: 5
>
> Error status and message got from server due to COPY command failure
> are : PGRES_FATAL_ERROR ERROR: unexpected message type 0x50 during
> COPY from stdin
> CONTEXT: COPY batch_demo, line 1
Same result here.
BTW the doc says:
"In batch mode only asynchronous operations are permitted, and COPY is
not recommended as it most likely will trigger failure in batch
processing"
Yet it seems that the test assumes that it should work nonetheless.
I don't quite understand what we expect of this test, given what's
documented. Or what am I missing?
While looking at the regress log, I noticed multiple spurious
test_singlerowmode tests among the others. Should be fixed with:
inline patch 1: src/test/modules/test_libpq/testlibpqbatch.c (+0/-0 lines) download inline-1.patch--- a/src/test/modules/test_libpq/testlibpqbatch.c+++ b/src/test/modules/test_libpq/testlibpqbatch.c@@ -1578,6 +1578,7 @@ main(int argc, char **argv) run_batch_abort = 0;
run_timings = 0;
run_copyfailure = 0;
+ run_singlerowmode = 0;
if (strcmp(argv[3], "disallowed_in_batch") == 0)
run_disallowed_in_batch = 1;
else if (strcmp(argv[3], "simple_batch") == 0)
There's also the fact that this test doesn't care whether it fails
(compare with all the "goto fail" of the other tests).
And it happens that PQsetSingleRowMode() fails after the call to
PQbatchQueueProcess() that instantiates a PGresult
of status PGRES_BATCH_END to indicate the end of the batch,
To me this shows how this way of setting the single row mode is not ideal.
In order to avoid the failure, the loop should know in advance
what kind of result it's going to dequeue before calling PQgetResult(),
which doesn't feel right.
Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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: daniel@manitou-mail.org, michael.paquier@gmail.com, vaishnaviprabakaran@gmail.com, VaishnaviP@fast.au.fujitsu.com, craig@2ndquadrant.com, kommi.haribabu@gmail.com, tsunakawa.takay@jp.fujitsu.com, dmitigr@gmail.com, andres@anarazel.de, m.kniep@web.de, fujita.etsuro@lab.ntt.co.jp, iwata.aya@jp.fujitsu.com
Subject: Re: PATCH: Batch/pipelining support for libpq
In-Reply-To: <5f3810de-df50-49a2-82fa-b95111ef2bbd@manitou-mail.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