Re: getting rid of "thread fork emulation" in pgbench?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: getting rid of "thread fork emulation" in pgbench?
Date: 2015-03-29 18:18:48
Message-ID: 25194.1427653128@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
>> And what will you do instead? It would be fine I think for pgbench to
>> not allow --jobs different from 1 on a threadless platform, but not for
>> it to fail to work altogether.

> Sure. No thread really means working with only one thread.

>> It looks to me like allowing it to compile without that code would take
>> nearly as much effort/mess as what's there now.

> My motivation is to simplify how things are done by simply assuming that
> threads are available and can share data, esp for counters.

pgbench does not get to "assume that threads are available", at least
not as long as the project as a whole supports --disable-thread-safety.

As I said, I wouldn't have a problem with restricting the --jobs setting
on threadless platforms, which seems like it would fix your problem since
you wouldn't need to have more than one process involved.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2015-03-29 18:20:10 Re: improve pgbench syntax error messages
Previous Message Fabien COELHO 2015-03-29 17:49:30 Re: getting rid of "thread fork emulation" in pgbench?