Re: Something fishy happening on frogmouth
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@2ndquadrant.com>,
Andrew Dunstan <andrew@dunslane.net>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2013-10-30T16:56:55Z
Lists: pgsql-hackers
On Wed, Oct 30, 2013 at 12:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Robert Haas <robertmhaas@gmail.com> writes: >> Yeah, I think that's probably what it is. There's PostmasterRandom() >> to initialize the random-number generator on first use, but that >> doesn't help if some other module calls random(). I wonder if we >> ought to just get rid of PostmasterRandom() and instead have the >> postmaster run that initialization code very early in startup. > > You could do arbitrary rearrangement of the postmaster's code and not > succeed in affecting this behavior in the slightest, because the > postmaster isn't running during bootstrap. Well, if you're telling me that it's not possible to find a way to arrange things so that the random number is initialized before first use, I'm gonna respectfully disagree. If you're just critiquing my particular suggestion about where to put that code - fair enough. Maybe it really ought to live in our src/port implementation of random() or pg_lrand48(). -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Initialize random() in bootstrap/stand-alone postgres and in initdb.
- 402da7054f34 9.3.25 landed
- 401228183a63 9.4.20 landed
- d68d5adfdcae 9.5.15 landed
- 89f2b64da370 11.0 landed
- 4232cff11b84 10.6 landed
- 329cacb90270 9.6.11 landed
- d18f6674bd60 12.0 landed
-
Modify dynamic shared memory code to use Size rather than uint64.
- d2aecaea1555 9.4.0 cited