In pgbench, when an error occurs during a benchmark run (SQL error,
connection error, etc.) it just prints an error message and then
proceeds to print the run summary normally and exits with status 0. So
this is quite inconvenient, especially from a script.
The attached patch changes this so that it exits with status 1 and also
prints a line below the summary advising that the results are incomplete.
The test suite had, curiously, encoded the previous behavior, checking
for exit status 0 vs 1 in various error situations. In this patch, I
have just updated the expected results (which are all "1" now), but
perhaps we should remove listing that individually and just check for
nonzero in all cases somewhere centrally.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services