Re: [PATCH] pgbench: improve \sleep meta command
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>,
"kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>
Cc: 'miyake_kouta' <miyake_kouta@oss.nttdata.com>,
Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2021-03-08T15:54:18Z
Lists: pgsql-hackers
On 2021/03/08 23:10, Alvaro Herrera wrote: > On 2021-Mar-08, kuroda.hayato@fujitsu.com wrote: > >> Dear Fujii-san, Miyake-san >> >>> Isn't it better to accept even negative sleep time like currently pgbench does? >>> Otherwise we always need to check the variable is a positive integer >>> (for example, using \if command) when using it as the sleep time in \sleep >>> command. That seems inconvenient. >> >> Both of them are acceptable for me. >> But we should write down how it works when the negative value is input if we adopt. > > Not sleeping at all seems a good reaction (same as for zero, I guess.) +1. BTW, IIUC currently \sleep works in that way. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
Commits
-
pgbench: Improve error-handling in \sleep command.
- 8c6eda2d1c92 14.0 landed