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. http://www.kernel.org/doc/man-pages/online/pages/man3/random_r.3.html Should we replace random() to random_r()? Some configure test might be needed. Regards, --- Takahiro Itagaki NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers