pgsql: Arrange to generate different random sequences in the different

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Arrange to generate different random sequences in the different
Дата
Msg-id 20091211215006.8577B753FB7@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Arrange to generate different random sequences in the different child
processes of a pgbench run, when we are using -j > 1 and are emulating
threads via fork().  Otherwise the children all inherit the same random
sequence state and produce the same random-number sequence.

In the threaded case the different threads will share one RNG state, so
they will produce different subsets of one sequence, which is maybe more
correlated than a purist would like but will not be "the same".  So we
leave that case alone.

First noticed by Takahiro Itagaki, and is also part of the explanation
for the pgbench misbehavior recently reported by Jaime Casanova.

Modified Files:
--------------
    pgsql/contrib/pgbench:
        pgbench.c (r1.91 -> r1.92)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/pgbench/pgbench.c?r1=1.91&r2=1.92)

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

Предыдущее
От: fxjr@pgfoundry.org (User Fxjr)
Дата:
Сообщение: npgsql - Npgsql2: Bug: Money to Decimal conversion.
Следующее
От: rhaas@postgresql.org (Robert Haas)
Дата:
Сообщение: pgsql: Export ExplainBeginOutput() and ExplainEndOutput() for