pgbench exit code

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pgbench exit code
Date: 2018-08-09 12:52:14
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers

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
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-pgbench-Report-errors-during-run-better.patch text/plain 6.6 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2018-08-09 13:00:34 Re: commitfest 2018-07
Previous Message Andres Freund 2018-08-09 12:30:59 Re: remove ancient pre-dlopen dynloader code