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.
for (j = 0; j < thread->nstate; j++)
{
total_xacts += thread->state[j].cnt;
- total_latencies += thread->state[i].txn_latencies;
- total_sqlats += thread->state[i].txn_sqlats;
+ total_latencies += thread->state[j].txn_latencies;
+ total_sqlats += thread->state[j].txn_sqlats;
}
}
disconnect_all(state, nclients);