Re: pgsql: Set random seed for pgbench.

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pgsql: Set random seed for pgbench.
Дата
Msg-id 20180401072208.GB2211@paquier.xyz
обсуждение исходный текст
Ответ на Re: pgsql: Set random seed for pgbench.  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: pgsql: Set random seed for pgbench.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
On Sat, Mar 31, 2018 at 07:43:38PM +0200, Fabien COELHO wrote:
> Indeed, I clearly misunderstood its usage pattern. I looked at its source
> ("src/port/pg_strong_random.c") where the function is always defined and is
> documented as returning false if it does not find a strong random source, so
> I though that checking for this was enough. But indeed its
> compilation fails if no source is provided.

I have not check in details this thread so I may be saying something
stupid...  But if you are looking for a frontend implementation for
strong randoms, please extract pg_frontend_random in fe-auth-scram.c and
move it to its own file for example in src/common as a frontend-only
file.  When working on SCRAM, I recall mentioning that but Heikki has
kept the code in its current shape for simplicity.

As far as I can see, there is no reason to issue an error in
set_random_seed() either in pgbench code.
--
Michael

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: Fix non-portable use of round().
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Set random seed for pgbench.