Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error

Yugo Nagata <nagata@sraoss.co.jp>

From: Yugo NAGATA <nagata@sraoss.co.jp>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>, pgsql-hackers@postgresql.org
Date: 2021-11-15T17:26:43Z
Lists: pgsql-hackers

Attachments

Hello Daniel Gustafsson,

On Mon, 15 Nov 2021 14:13:32 +0100
Daniel Gustafsson <daniel@yesql.se> wrote:

> > On 21 Jul 2021, at 03:49, Yugo NAGATA <nagata@sraoss.co.jp> wrote:
> 
> > I attached the updated patch v2, which includes a comment fix and a TAP test.
> 
> This patch fails the TAP test for pgbench:

Thank you for pointing it out!
I attached the updated patch.

Regards,
Yugo Nagata

>   # Tests were run but no plan was declared and done_testing() was not seen.
>   # Looks like your test exited with 25 just after 224.
>   t/001_pgbench_with_server.pl ..
>   Dubious, test returned 25 (wstat 6400, 0x1900)
>   All 224 subtests passed
>   t/002_pgbench_no_server.pl .... ok
>   Test Summary Report
>   -------------------
>   t/001_pgbench_with_server.pl (Wstat: 6400 Tests: 224 Failed: 0)
>   Non-zero exit status: 25
>   Parse errors: No plan found in TAP output
>   Files=2, Tests=426, 3 wallclock secs ( 0.04 usr 0.00 sys + 1.20 cusr 0.36 csys = 1.60 CPU)
>   Result: FAIL
> 
> --
> Daniel Gustafsson		https://vmware.com/
> 


-- 
Yugo NAGATA <nagata@sraoss.co.jp>

Commits

  1. Fix pgbench in prepared mode with an empty pipeline

  2. pgbench: Prepare commands in pipelines in advance

  3. Add -M (query mode) option per ITAGAKI Takahiro