[COMMITTERS] pgsql: Fix busy-wait in pgbench, with --rate. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject [COMMITTERS] pgsql: Fix busy-wait in pgbench, with --rate.
Date
Msg-id E1dyXsk-0000nN-4A@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/396ef1561878a5d42ea9191f60098b7fbbec6e41

Modified Files
--------------
src/bin/pgbench/pgbench.c | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)


--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [COMMITTERS] pgsql: Add test for postmaster crash restarts.
Next
From: Peter Eisentraut
Date:
Subject: [COMMITTERS] pgsql: Add list of acknowledgments to release notes