]> granicus.if.org Git - postgresql/commit
pgbench: Report errors during run better
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 9 Oct 2018 10:04:04 +0000 (12:04 +0200)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 15 Oct 2018 08:34:35 +0000 (10:34 +0200)
commit5b75a4f8266a4f187a47929fed0582ee778c703f
tree990d1f511957821efd3fb18f5efdeb9f9d444c39
parent35584fd05f9b104f057c700360985991f111a847
pgbench: Report errors during run better

When an error occurs during a benchmark run, exit with a nonzero exit
code and write a message at the end.  Previously, it would just print
the error message when it happened but then proceed to print the run
summary normally and exit with status 0.  To still allow
distinguishing setup from run-time errors, we use exit status 2 for
the new state, whereas existing errors during pgbench initialization
use exit status 1.

Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>
doc/src/sgml/ref/pgbench.sgml
src/bin/pgbench/pgbench.c
src/bin/pgbench/t/001_pgbench_with_server.pl