Re: Still wondering about random numbers...
Allan Engelhardt <allane@cybaea.com>
From: Allan Engelhardt <allane@cybaea.com>
To: Bruno Wolff III <bruno@wolff.to>
Date: 2001-08-07T21:07:59Z
Lists: pgsql-general
Bruno Wolff III wrote: > On Tue, Aug 07, 2001 at 04:36:23PM +0000, > Thomas Lockhart <lockhart@fourpalms.org> wrote: > > > > configure is our friend. A better random number generator is always > > welcome imho, and if it can be reliably supported through autoconf then > > it would stand a chance to be included in the main tree. Especially > > since the usage of random() seems to be very isolated in the code. > > contrib/ is always a good first step though... > > 'Better' is in the eye of the beholder. /dev/random can stall for > very long periods of time waiting for entropy. On Intel i8x0 motherboards you can set the CONFIG_INTEL_RNG kernel parameter and access the hardware random entropy generator. On other motherboards, reading from /dev/random can stall indefinitely. This is not a Good Thing. /dev/urandom is fine, but not rally better than rand(3) or random(3). Is it actually possible to replace the built-in function? I haven't checked. If it is, then contrib is a fine place for the improvement. If it isn't, then configure is probably our friend. Just my £0.02. Allan.