postgresql/src/bin/pgbench
Heikki Linnakangas babf185794 Fix busy-wait in pgbench, with --rate.
If --rate was used to throttle pgbench, it failed to sleep when it had
nothing to do, leading to a busy-wait with 100% CPU usage. This bug was
introduced in the refactoring in v10. Before that, sleep() was called with
a timeout, even when there were no file descriptors to wait for.

Reported by Jeff Janes, patch by Fabien COELHO. Backpatch to v10.

Discussion: https://www.postgresql.org/message-id/CAMkU%3D1x5hoX0pLLKPRnXCy0T8uHoDvXdq%2B7kAM9eoC9_z72ucw%40mail.gmail.com
2017-10-01 09:34:29 +03:00
..
t Rework PostgresNode's psql method 2016-03-03 17:58:30 -03:00
.gitignore Call xlc __isync() after, not before, associated compare-and-swap. 2016-02-19 22:47:50 -05:00
exprparse.y Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
exprscan.l Allow backslash line continuations in pgbench's meta commands. 2017-01-20 11:10:22 -05:00
Makefile Fix broken link-command-line ordering for libpgfeutils. 2017-07-14 12:26:53 -04:00
pgbench.c Fix busy-wait in pgbench, with --rate. 2017-10-01 09:34:29 +03:00
pgbench.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00