summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-10-09 12:04:04 +0200
committerPeter Eisentraut <peter_e@gmx.net>2018-10-15 10:34:35 +0200
commit5b75a4f8266a4f187a47929fed0582ee778c703f (patch)
tree990d1f511957821efd3fb18f5efdeb9f9d444c39 /doc/src
parent35584fd05f9b104f057c700360985991f111a847 (diff)
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>
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/pgbench.sgml12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml
index 8c464c9d421..b5e3a62a339 100644
--- a/doc/src/sgml/ref/pgbench.sgml
+++ b/doc/src/sgml/ref/pgbench.sgml
@@ -805,6 +805,18 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
</refsect1>
<refsect1>
+ <title>Exit Status</title>
+
+ <para>
+ A successful run will exit with status 0. Exit status 1 indicates static
+ problems such as invalid command-line options. Errors during the run such
+ as database errors or problems in the script will result in exit status 2.
+ In the latter case, <application>pgbench</application> will print partial
+ results.
+ </para>
+ </refsect1>
+
+ <refsect1>
<title>Notes</title>
<refsect2>