pgbench exit code - Mailing list pgsql-hackers

From Peter Eisentraut
Subject pgbench exit code
Date
Msg-id 260c6cce-ff12-4c78-0c72-bd4a1a738cbd@2ndquadrant.com
Whole thread Raw
Responses Re: pgbench exit code
List 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              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: remove ancient pre-dlopen dynloader code
Next
From: Andrew Dunstan
Date:
Subject: Re: commitfest 2018-07