Fix bug in collecting total_latencies from all threads in pgbench.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 28 Jul 2015 08:30:23 +0000 (11:30 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 28 Jul 2015 08:30:23 +0000 (11:30 +0300)
commitb2ed8edeecd715c8a23ae462da843578e5cde7f4
tree3d448f454c050f721e034d992e833bdff0238bac
parent5e65f45c6eff8278e2901511da61d3a265adc874
Fix bug in collecting total_latencies from all threads in pgbench.

This was broken in 1bc90f7a, which removed the thread-emulation. With modest
-j and -c settings the result were usually close enough that you wouldn't
notice it easily, but with a high enough thread count it would access
uninitialized memory and crash.

Per report from Andres Freund offlist.
src/bin/pgbench/pgbench.c