Re: Suggestion to add --continue-client-on-abort option to pgbench - Mailing list pgsql-hackers

From Rintaro Ikeda
Subject Re: Suggestion to add --continue-client-on-abort option to pgbench
Date
Msg-id 68d61801-f345-4000-9cf1-ae67a8b75b89@oss.nttdata.com
Whole thread Raw
In response to RE: Suggestion to add --continue-client-on-abort option to pgbench  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Responses RE: Suggestion to add --continue-client-on-abort option to pgbench
List 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

pgsql-hackers by date:

Previous
From: Xuneng Zhou
Date:
Subject: Re: Add CHECK_FOR_INTERRUPTS in polling loop code path in XactLockTableWait
Next
From: jian he
Date:
Subject: Re: why there is not VACUUM FULL CONCURRENTLY?