Re: Something fishy happening on frogmouth

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@2ndquadrant.com>, Andrew Dunstan <andrew@dunslane.net>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2013-10-30T16:51:53Z
Lists: pgsql-hackers
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.  I continue to doubt that
there's a good reason to be creating DSM segment(s) here.

			regards, tom lane


Commits

  1. Initialize random() in bootstrap/stand-alone postgres and in initdb.

  2. Modify dynamic shared memory code to use Size rather than uint64.