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

From: Rintaro Ikeda <ikedarintarof(at)oss(dot)nttdata(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: "slpmcf(at)gmail(dot)com" <slpmcf(at)gmail(dot)com>, "boekewurm+postgres(at)gmail(dot)com" <boekewurm+postgres(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Subject: Re: Suggestion to add --continue-client-on-abort option to pgbench
Date: 2025-06-08 14:59:49
Message-ID: 68d61801-f345-4000-9cf1-ae67a8b75b89@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Kuroda-san, hackers,

On 2025/06/04 21:57, Hayato Kuroda (Fujitsu) wrote:
> Dear Ikeda-san,
>
> Thanks for starting the new thread! I have never known the issue before I heard at
> PGConf.dev.
>
> Few comments:
>
> 1.
> This parameter seems a type of benchmark option. So should we set
> benchmarking_option_set as well?
>
> 2.
> Not sure, but exit-on-abort seems a similar option. What if both are specified?
> Is it allowed?
>
> 3.
> Can you consider a test case for the new parameter?
>
> Best regards,
> Hayato Kuroda
> FUJITSU LIMITED
>
>

Thank you for your valuable comment!

1. I should've also set benchmarking_option_set. I've modified it accordingly.

2. The exit-on-abort option and continue-on-error option are mutually exclusive.
Therefore, I've updated the patch to throw a FATAL error when two options are
set simultaneously. Corresponding explanation was also added.
(I'm wondering the name of parameter should be continue-on-abort so that users
understand the two option are mutually exclusive.)

3. I've added the test.

Additionally, I modified the patch so that st->state does not transition to
CSTATE_RETRY when a transaction fails and continue-on-error option is enabled.
In the previous patch, we retry the failed transaction up to max-try times,
which is unnecessary for our purpose: clients does not exit when its
transactions fail.

I've attached the updated patch.
v3-0001-Add-continue-on-error-option-to-pgbench.patch is identical to
v4-0001-Add-continue-on-error-option-to-pgbench.patch. The v4-0002 patch is the
diff from the previous patch.

Best regards,
Rintaro Ikeda

Attachment Content-Type Size
v4-0001-Add-continue-on-error-option-to-pgbench.patch text/plain 7.3 KB
v4-0002-1.-Do-not-retry-failed-transaction-due-to-other_sql_.patch text/plain 6.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-06-08 16:05:59 Re: why there is not VACUUM FULL CONCURRENTLY?
Previous Message Xuneng Zhou 2025-06-08 14:51:54 Re: Add CHECK_FOR_INTERRUPTS in polling loop code path in XactLockTableWait