On Thu, Oct 31, 2013 at 2:44 PM, Garick Hamlin <gham...@isc.upenn.edu> wrote: > I think using /dev/urandom directly would be surprising. At least it would > have probably have taken me a while to figure out what was depleting the > entropy pool here.
Perhaps so; a bigger problem IMHO is that it's not portable. I think the only way to solve this problem is to import (or have an option to link with) a strong, sophisticated PRNG with much larger internal state than pg_lrand48, which uses precisely 48 bits of internal state. For this kind of thing, I'm fairly sure that we need something with at least 128 bits of internal state (as wide as the random value we want to generate) and I suspect it might be advantageous to have something a whole lot wider, maybe a few kB. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers