From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Dmitry Vasilyev <d.vasilyev@postgrespro.ru>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission denied”
Date: Thu, 22 Sep 2016 15:51:36 -0400
Message-ID: <11822.1474573896@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoaKCDJM2vzDu7YXx_q_S9v7-qhmwHLo5O6Pk7BbP0V9nw@mail.gmail.com>
References: <1444920387.3661.7.camel@postgrespro.ru>
<1444921511.3661.13.camel@postgrespro.ru>
<CAA4eK1+pjtDouF-Lc9y0UgFDmWHnaf4KwiM1Y3Anq0wZ1gwsAA@mail.gmail.com>
<CA+TgmoY+_VJWJaGMAaVtk6=hLH6kxn3Wvu9xkendVRRX93fjOQ@mail.gmail.com>
<20789.1474390434@sss.pgh.pa.us>
<CA+TgmoaKCDJM2vzDu7YXx_q_S9v7-qhmwHLo5O6Pk7BbP0V9nw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Sep 20, 2016 at 12:53 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'd be the first to agree that this point is inadequately documented
>> in the code, but PostmasterRandom should be reserved for its existing
>> security-related uses, not exposed to the world for (ahem) random other
>> uses.
> So, we could have dsm_postmaster_startup() seed the random number
> generator itself, and then let PostmasterRandom() override the seed
> later. Like maybe:
Works for me, at least as a temporary solution. The disturbing thing
here is that this still only does what we want if dsm_postmaster_startup
happens before the first PostmasterRandom call --- which is OK today but
seems pretty fragile. Still, redesigning PostmasterRandom's seeding
technique is not something to do right before 9.6 release. Let's revert
the prior patch and do it as you have here:
> struct timeval tv;
> gettimeofday(&tv, NULL);
> srandom(tv.tv_sec);
> ...
> dsm_control_handle = random();
for the time being.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, amit.kapila16@gmail.com, d.vasilyev@postgrespro.ru
Subject: Re: Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission denied”
In-Reply-To: <11822.1474573896@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox