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”

2016-09-20 Thread Tom Lane
Robert Haas writes: > Yeah, random() is the wrong thing. It should use PostmasterRandom(). > Fixed to do that instead. I am not very happy about this patch; have you considered the security implications of what you just did? If you haven't, I'll tell you: you just made

[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”

2016-09-20 Thread Robert Haas
On Thu, Oct 15, 2015 at 11:32 PM, Amit Kapila wrote: > On Thu, Oct 15, 2015 at 8:35 PM, Dmitry Vasilyev > wrote: >> >> I think that function dsm_impl_windows() with EACCES error should not >> do ereport() with FATAL level. It works, but it is

[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”

2015-10-17 Thread Amit Kapila
On Sat, Oct 17, 2015 at 12:07 AM, Robert Haas wrote: > > On Thu, Oct 15, 2015 at 11:32 PM, Amit Kapila wrote: > > Another some what related point is currently we are using random() > > function to ensure a unique name for dsm and it seems to me

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”

2015-10-17 Thread Tom Lane
Amit Kapila writes: > On Sat, Oct 17, 2015 at 12:07 AM, Robert Haas wrote: >> Maybe we need to be using PostmasterRandom() rather than random() for >> the control segment name. > +1. Though I think it is better to investigate the actual cause

[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”

2015-10-16 Thread Robert Haas
On Thu, Oct 15, 2015 at 11:32 PM, Amit Kapila wrote: > Another some what related point is currently we are using random() > function to ensure a unique name for dsm and it seems to me that > it is always going to generate same number on first invocation (at least > thats

[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”

2015-10-16 Thread Amit Kapila
On Fri, Oct 16, 2015 at 12:16 PM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > This is wrong, current code does well for this case. I should > broke the code during investigating the problem. > > > > So, to make the windows version behave as the same, > > > dsm_impl_windows should