Re: pgbench - exclude pthread_create() from connection start timing - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pgbench - exclude pthread_create() from connection start timing
Date
Msg-id alpine.DEB.2.02.1310060941120.18141@sto
Whole thread Raw
In response to Re: pgbench - exclude pthread_create() from connection start timing  (Noah Misch <noah@leadboat.com>)
Responses Re: pgbench - exclude pthread_create() from connection start timing
List 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.



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pgbench progress report improvements - split 3 v2 - A
Next
From: Michael Paquier
Date:
Subject: Re: [COMMITTERS] pgsql: Add DISCARD SEQUENCES command.