Re: random() generates collisions too early
От | Tom Lane |
---|---|
Тема | Re: random() generates collisions too early |
Дата | |
Msg-id | 29392.1382368446@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: random() generates collisions too early (Heikki Linnakangas <hlinnakangas@vmware.com>) |
Ответы |
Re: random() generates collisions too early
|
Список | pgsql-bugs |
Heikki Linnakangas <hlinnakangas@vmware.com> writes: > On 18.10.2013 14:55, Honza Horak wrote: >> The results covered only 181383 distinct values, and 68 values >> repeated four or five times each. We should at least consider using a >> higher-entropy seed. > Interesting. PostgreSQL's random() function just calls the underlying > libc random() function. I assume you tested this on with Linux and glibc. I agree with the theory that this probably isn't the fault of the random() function as such, but with our code to reset the random seed when forking a postmaster child process. Note that the test case is only examining the first random value created in each process. So basically what this is measuring is the number of different seed values we use. regards, tom lane
В списке pgsql-bugs по дате отправления: