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

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error
Date: 2021-07-17 05:03:01
Message-ID: alpine.DEB.2.22.394.2107170650260.3143659@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello Yugo-san,

> [...] One way to avoid these errors is to send Parse messages before
> pipeline mode starts. I attached a patch to fix to prepare commands at
> starting of a script instead of at the first execution of the command.

> What do you think?

ISTM that moving prepare out of command execution is a good idea, so I'm
in favor of this approach: the code is simpler and cleaner.

ISTM that a minor impact is that the preparation is not counted in the
command performance statistics. I do not think that it is a problem, even
if it would change detailed results under -C -r -M prepared.

Patch applies & compiles cleanly, global & local make check ok. However
the issue is not tested. I think that the patch should add a tap test case
for the problem being addressed.

I'd suggest to move the statement preparation call in the

In comments: not yet -> needed.


In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Fan 2021-07-17 07:32:18 Re: UniqueKey on Partitioned table.
Previous Message Bharath Rupireddy 2021-07-17 04:24:07 Re: CREATE COLLATION - check for duplicate options and error out if found one