pgbench - minor fix for meta command only scripts
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2016-07-09T07:09:03Z
Lists: pgsql-hackers
Attachments
- pgbench-no-sql-fix-1.sql (application/x-sql)
- noop.sql (application/x-sql)
While testing meta-command pgbench only scripts, I noticed that there is an infinite loop in threadRun, which means that other tasks such as reporting progress do not get a chance. The attached patch breaks this loop by always returning at the end of a script. On "pgbench -T 3 -P 1 -f noop.sql", before this patch, the progress is not shown, after it is. -- Fabien.
Commits
-
Fix busy-wait in pgbench, with --rate.
- babf18579455 10.0 landed
- 396ef1561878 11.0 landed
-
Refactor script execution state machine in pgbench.
- 12788ae49e19 10.0 cited