Re: Something fishy happening on frogmouth

Noah Misch <noah@leadboat.com>

From: Noah Misch <noah@leadboat.com>
To: tgl@sss.pgh.pa.us, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: robertmhaas@gmail.com, andres@2ndquadrant.com, andrew@dunslane.net, pgsql-hackers@postgresql.org
Date: 2018-09-24T06:32:41Z
Lists: pgsql-hackers
On Wed, Sep 19, 2018 at 01:03:44PM +0900, Kyotaro HORIGUCHI wrote:
> Thank you for finding and fixing this.
> 
> At Sat, 15 Sep 2018 18:21:52 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote in <15555.1537050112@sss.pgh.pa.us>
> > Noah Misch <noah@leadboat.com> writes:
> > > Usually, the first srandom() call happens early in PostmasterMain().  I plan
> > > to add one to InitStandaloneProcess(), which substitutes for several tasks
> > > otherwise done in PostmasterMain().  That seems like a good thing even if DSM
> > > weren't in the picture.  Also, initdb needs an srandom() somewhere;
> > > choose_dsm_implementation() itself seems fine.  Attached.
> > 
> > +1, but some comments would be good.

> +1, too.

Thanks for reviewing.  I pushed with some comments.


Commits

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

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