Re: Suggestion to add --continue-client-on-abort option to pgbench

Yugo Nagata <nagata@sraoss.co.jp>

From: Yugo Nagata <nagata@sraoss.co.jp>
To: Rintaro Ikeda <ikedarintarof@oss.nttdata.com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, "slpmcf@gmail.com" <slpmcf@gmail.com>, "boekewurm+postgres@gmail.com" <boekewurm+postgres@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Srinath Reddy Sadipiralla <srinath2133@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>
Date: 2025-07-15T02:16:40Z
Lists: pgsql-hackers

Attachments

Hi,

On Sun, 13 Jul 2025 23:15:24 +0900
Rintaro Ikeda <ikedarintarof@oss.nttdata.com> wrote:

> I noticed one small thing I’d like to discuss. I'm not sure that users clearly
> understand which aborted in the following error message, the client or the script.
> > pgbench: error: client 0 script 0 aborted in command ... query ...
> 
> Since the code path always results in a client abort, I wonder if the following
> message might be clearer:
> > pgbench: error: client 0 aborted in script 0 command ... query ...

Indeed, it seems clearer to explicitly state that it is the client that
was aborted.

I've attached an updated patch that replaces the remaining message mentioned
above with a call to commandFailed(). With this change, the output in such
situations will now be:

 "client 0 aborted in command 0 (SQL) of script 0; ...."

Regards,
Yugo Nagata

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

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. pgbench: Fix assertion failure with multiple \syncpipeline in pipeline mode.

  2. pgbench: Add --continue-on-error option.

  3. Fix "inconsistent DLL linkage" warning on Windows MSVC

  4. pgbench: Fix error reporting in readCommandResponse().

  5. pgbench: Fix assertion failure with retriable errors in pipeline mode.

  6. Allow pgbench to retry in some cases.