diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index bd5e265b84b..ed7fc1946eb 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -2299,6 +2299,10 @@ printResults(int ttype, int64 normal_xacts, int nclients, normal_xacts); } + /* Remaining stats are nonsensical if we failed to execute any xacts */ + if (normal_xacts <= 0) + return; + if (throttle_delay || progress) { /* compute and show latency average and standard deviation */