From: | ikedarintarof <ikedarintarof(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
Cc: | slpmcf(at)gmail(dot)com, boekewurm+postgres(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Suggestion to add --continue-client-on-abort option to pgbench |
Date: | 2025-06-02 14:21:28 |
Message-ID: | 4AD9396D-6753-4C41-AE42-56FEF0E8D847@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi, hakers.
> On Tue, May 13, 2025 at 11:27 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com <mailto:dilipbalaut(at)gmail(dot)com>> wrote:
>>
>> 1. You need to update the stats for this new counter in the
>> "accumStats()" function.
>>
>> 2. IMHO, " continue-on-error " is more user-friendly than
>> "continue-client-on-error".
>>
>> 3. There are a lot of whitespace errors, so those can be fixed. You
>> can just try to apply using git am, and it will report those
>> whitespace warnings. And for fixing, you can just use
>> "--whitespace=fix" along with git am.
> On May 14, 2025, at 18:08, Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com> wrote:
>
> Here's the diff for the missing usage information for this option and as Dilip mentioned updating the new counter in the "accumStats()" function.
Thank you very much for the helpful comments, and apologies for my delayed reply.
I've updated the patch based on your suggestions:
- Modified name of the option.
- Added the missing explanation.
- Updated the new counter in the `accumStats()` function as pointed out.
- Fixed the whitespace issues.
Additionally, I've included documentation for the new option.
I'm submitting this updated patch to the current CommitFest.
Best Regards,
Rintaro Ikeda

> On May 14, 2025, at 18:08, Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com> wrote:
>
>
> Hi,
>
> On Tue, May 13, 2025 at 11:27 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com <mailto:dilipbalaut(at)gmail(dot)com>> wrote:
>> On Tue, May 13, 2025 at 9:20 AM <Rintaro(dot)Ikeda(at)nttdata(dot)com <mailto:Rintaro(dot)Ikeda(at)nttdata(dot)com>> wrote:
>> > I also appreciate you for pointing out my mistakes in the previous version of the patch. I fixed the duplicated lines. I’ve attached the updated patch.
>> >
>> This is a useful feature, so +1 from my side. Here are some initial
>> comments on the patch while having a quick look.
>>
>> 1. You need to update the stats for this new counter in the
>> "accumStats()" function.
>>
>> 2. IMHO, " continue-on-error " is more user-friendly than
>> "continue-client-on-error".
>>
>> 3. There are a lot of whitespace errors, so those can be fixed. You
>> can just try to apply using git am, and it will report those
>> whitespace warnings. And for fixing, you can just use
>> "--whitespace=fix" along with git am.
>
>
> Hi, +1 for the idea. I’ve reviewed and tested the patch. Aside from Dilip’s feedback and the missing usage information for this option, the patch LGTM.
>
> Here's the diff for the missing usage information for this option and as Dilip mentioned updating the new counter in the "accumStats()" function.
>
> diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
> index baaf1379be2..20d456bc4b9 100644
> --- a/src/bin/pgbench/pgbench.c
> +++ b/src/bin/pgbench/pgbench.c
> @@ -959,6 +959,8 @@ usage(void)
> " --log-prefix=PREFIX prefix for transaction time log file\n"
> " (default: \"pgbench_log\")\n"
> " --max-tries=NUM max number of tries to run transaction (default: 1)\n"
> + " --continue-client-on-error\n"
> + " Continue and retry transactions that failed due to errors other than serialization or deadlocks.\n"
> " --progress-timestamp use Unix epoch timestamps for progress\n"
> " --random-seed=SEED set random seed (\"time\", \"rand\", integer)\n"
> " --sampling-rate=NUM fraction of transactions to log (e.g., 0.01 for 1%%)\n"
> @@ -1522,6 +1524,9 @@ accumStats(StatsData *stats, bool skipped, double lat, double lag,
> case ESTATUS_DEADLOCK_ERROR:
> stats->deadlock_failures++;
> break;
> + case ESTATUS_OTHER_SQL_ERROR:
> + stats->other_sql_failures++;
> + break;
> default:
> /* internal error which should never occur */
> pg_fatal("unexpected error status: %d", estatus);
> --
> Thanks,
> Srinath Reddy Sadipiralla
> EDB: https://www.enterprisedb.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Nathan Bossart | 2025-06-02 14:21:39 | Re: fix notes about password encryption in pg_authid docs |
Previous Message | Nathan Bossart | 2025-06-02 14:16:10 | fix notes about password encryption in pg_authid docs |