On Sun, Mar 15, 2015 at 3:35 PM, Fabien COELHO <coe...@cri.ensmp.fr> wrote: >> Firstly, the fact that pgbench produces one file per thread is awkward. > > I agree, but I think it is due to the multi process thread emulation: if you > have real threads, you can do a simple fprintf, possibly with some mutex, > and you're done. There is really nothing to do to implement this > feature.
I think that's probably not a good idea, because fprintf() might then become a bottleneck. I fixed a similar problem with random() in commit 4af43ee3f165c8e4b332a7e680a44f4b7ba2d3c1. Even though the locking was happening inside libc, it was still locking, and it still caused a contention problem. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers