Re: Bug in pgbench prepared statements

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Lev Kokotov <lev(dot)kokotov(at)gmail(dot)com>
Cc: Tristan Partin <tristan(at)neon(dot)tech>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Bug in pgbench prepared statements
Date: 2023-12-01 07:18:55
Message-ID: ZWmI3714tv5PGVJ9@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 30, 2023 at 07:15:54PM -0800, Lev Kokotov wrote:
>> I see prepareCommand() is called one more time in
>> prepareCommandsInPipeline(). Should you also check the return value
>> there?
>
> Yes, good catch. New patch attached.

Agreed that this is not really helpful as it stands

>> It may also be useful to throw this patch on the January commitfest if
>> no one else comes along to review/commit it.
>
> First time contributing, not familiar with the process here, but happy to
> learn.

The patch you have sent does not apply cleanly on the master branch,
could you rebase please?

FWIW, I am a bit confused by the state of sendCommand(). Wouldn't it
better to consume the errors from PQsendQueryPrepared() and
PQsendQueryParams() when these fail?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-12-01 07:53:44 Remove unnecessary includes of system headers in header files
Previous Message shveta malik 2023-12-01 07:17:11 Re: Synchronizing slots from primary to standby