Re: [PATCH] pgbench: improve \sleep meta command

Fujii Masao <masao.fujii@oss.nttdata.com>

From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: 'miyake_kouta' <miyake_kouta@oss.nttdata.com>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2021-03-18T07:32:37Z
Lists: pgsql-hackers

Attachments


On 2021/03/17 16:40, kuroda.hayato@fujitsu.com wrote:
> Dear Fujii-san,
> 
> Thank you for updating the patch.

Thanks for the review!


> I understand that you don't want to change the current specification.
> 
> ```diff
> +               if (usec == 0)
> +               {
> +                       char       *c = var;
> +
> +                       /* Skip sign */
> +                       if (*c == '+' || *c == '-')
> +                               c++;
> ```
> 
> In my understanding the skip is not necessary, because
> plus sign is already removed in the executeMetaCommand() and minus value can be returned by atoi().

Yes, you're right. I removed that check from the patch.
Attached is the updated version of the patch.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Commits

  1. pgbench: Improve error-handling in \sleep command.