While testing the pgbench setshell command patch with -j option,
I found all threads use the same sequence of random value.
At first, I think we need to call srandom() in each thread,
but the manual says we should use random_r() instead of random()
on multi-threaded programs.
Should we replace random() to random_r()?
Some configure test might be needed.
NTT Open Source Software Center