pgbench: Report errors during run better

Peter Eisentraut <peter_e@gmx.net>

Commit: 5b75a4f8266a4f187a47929fed0582ee778c703f
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2018-10-15T08:34:35Z
Releases: 12.0
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>

Files

Documentation touched