diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 2bdfc89d2a5..0c1b01ecdae 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -4515,6 +4515,10 @@ threadRun(void *arg) } } + /* under throttling we may have finished the last client above */ + if (remains == 0) + break; + /* also wake up to print the next progress report on time */ if (progress && min_usec > 0 && thread->tid == 0) {