Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c250994

Browse files
committed
Fix bug slowing down pgbench when -P is used.
A removed check in ba3deee made all threads but the main one busy-loop when -P was used. All threads computed the time to the next time the progress report should be printed, but only the main thread did so and re-scheduled it only for the future. Reported-By: Jesper Pedersen Discussion: 55C4E190.3050104@redhat.com
1 parent 89db839 commit c250994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/pgbench/pgbench.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3646,7 +3646,7 @@ threadRun(void *arg)
36463646
}
36473647

36483648
/* also wake up to print the next progress report on time */
3649-
if (progress && min_usec > 0)
3649+
if (progress && min_usec > 0 && thread->tid == 0)
36503650
{
36513651
/* get current time if needed */
36523652
if (now_usec == 0)

0 commit comments

Comments
 (0)