Re: pgbench - exclude pthread_create() from connection start timing

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>, pavel(dot)stehule(at)gmail(dot)com
Subject: Re: pgbench - exclude pthread_create() from connection start timing
Date: 2013-10-06 07:48:04
Message-ID: alpine.DEB.2.02.1310060941120.18141@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> Note that this is pretty standard stuff with threads, ISTM that it
>> would solve most of the issues, *but* this is not possible with the
>> "thread fork emulation" implemented by pgbench, which really means
>> no threads at all.
>
> You could do those same things in the fork emulation mode using anonymous
> shared memory, like we do in the server. That would permit removing the
> current "#ifdef PTHREAD_FORK_EMULATION" wart, too.

Yep, but I'm not sure that would reduce pgbench code complexity. Also, I'm
not sure of any system used with pgbench that do not have threads, so ISTM
that the thread fork-emulation hack is more or less useless, and it is
pretty masochistic to maintain when adding features.

> For the time being, I propose the attached comment patch.

It comment seems very clear to me. I do not understand why it starts with
XXX, though.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2013-10-06 07:51:53 Re: [COMMITTERS] pgsql: Add DISCARD SEQUENCES command.
Previous Message Fabien COELHO 2013-10-06 07:40:40 Re: pgbench progress report improvements - split 3 v2 - A