pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: pgbench: Improve error-handling in \sleep command.
2+ messages / 1 participants
[nested] [flat]
* pgsql: pgbench: Improve error-handling in \sleep command.
@ 2021-03-22 03:05 Fujii Masao <fujii@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Fujii Masao @ 2021-03-22 03:05 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
pgbench: Improve error-handling in \sleep command.
This commit improves pgbench \sleep command so that it handles
the following three cases more properly.
(1) When only one argument was specified in \sleep command and
it's not a number, previously pgbench reported a confusing error
message like "unrecognized time unit, must be us, ms or s".
This commit fixes this so that more proper error message like
"invalid sleep time, must be an integer" is reported.
(2) When two arguments were specified in \sleep command and
the first argument was not a number, previously pgbench treated
that argument as the sleep time 0. No error was reported in this
case. This commit fixes this so that an error is thrown in this
case.
(3) When a variable was specified as the first argument in \sleep
command and the variable stored non-digit value, previously
pgbench treated that argument as the sleep time 0. No error
was reported in this case. This commit fixes this so that
an error is thrown in this case.
Author: Kota Miyake
Reviewed-by: Hayato Kuroda, Alvaro Herrera, Fujii Masao
Discussion: https://postgr.es/m/23b254daf20cec4332a2d9168505dbc9@oss.nttdata.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8c6eda2d1c926be76baa79c28521275323bd26fd
Modified Files
--------------
src/bin/pgbench/pgbench.c | 43 ++++++++++++++++++++++++++++++++++++++-----
1 file changed, 38 insertions(+), 5 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: pgbench: Improve error-handling in pgbench.
@ 2021-11-02 13:50 Fujii Masao <fujii@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Fujii Masao @ 2021-11-02 13:50 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
pgbench: Improve error-handling in pgbench.
Previously failures of initial connection and logfile open caused pgbench
to proceed the benchmarking, report the incomplete results and exit with
status 2. It didn't make sense to proceed the benchmarking even when
pgbench could not start as prescribed.
This commit improves pgbench so that early errors that occur when
starting benchmark such as those failures should make pgbench exit
immediately with status 1.
Author: Yugo Nagata
Reviewed-by: Fabien COELHO, Kyotaro Horiguchi, Fujii Masao
Discussion: https://postgr.es/m/TYCPR01MB5870057375ACA8A73099C649F5349@TYCPR01MB5870.jpnprd01.prod.outlook.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cd29be5459f0e138c0f19d49ee588feeda78e3c9
Modified Files
--------------
doc/src/sgml/ref/pgbench.sgml | 10 ++++++----
src/bin/pgbench/pgbench.c | 26 +++++++++++++++-----------
2 files changed, 21 insertions(+), 15 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-11-02 13:50 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22 03:05 pgsql: pgbench: Improve error-handling in \sleep command. Fujii Masao <fujii@postgresql.org>
2021-11-02 13:50 pgsql: pgbench: Improve error-handling in pgbench. Fujii Masao <fujii@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox