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.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers