pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix busy-wait in pgbench, with --rate.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix busy-wait in pgbench, with --rate.
@ 2017-10-01 06:37  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 2+ messages in thread

From: Heikki Linnakangas @ 2017-10-01 06:37 UTC (permalink / raw)
  To: 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...

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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix busy-wait in pgbench, with --rate.
@ 2017-10-01 06:37  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 2+ messages in thread

From: Heikki Linnakangas @ 2017-10-01 06:37 UTC (permalink / raw)
  To: 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...

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/babf18579455e85269ad75e1ddb03f34138f77b6

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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-10-01 06:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-10-01 06:37 pgsql: Fix busy-wait in pgbench, with --rate. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2017-10-01 06:37 pgsql: Fix busy-wait in pgbench, with --rate. Heikki Linnakangas <heikki.linnakangas@iki.fi>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox