Re: PATCH: pgbench - merging transaction logs

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: PATCH: pgbench - merging transaction logs
Дата
Msg-id CA+TgmoZAuB+ZfMhS-LSjqsyv=gA7kBjADWf_A34cUeVTrNUmVA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PATCH: pgbench - merging transaction logs  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: PATCH: pgbench - merging transaction logs  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On Sun, Mar 15, 2015 at 3:35 PM, Fabien COELHO <coelho@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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: assessing parallel-safety
Следующее
От: Kouhei Kaigai
Дата:
Сообщение: Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)