RE: Initdb and IpcMemoryCreate Errors - Mailing list pgsql-cygwin

From Dave Page
Subject RE: Initdb and IpcMemoryCreate Errors
Date
Msg-id 8568FC767B4AD311AC33006097BCD3D61A2AF5@woody.vale-housing.co.uk
Whole thread Raw
In response to Initdb and IpcMemoryCreate Errors  (Dave Page <dpage@vale-housing.co.uk>)
List pgsql-cygwin

> -----Original Message-----
> From: Jason Tishler [mailto:Jason.Tishler@dothill.com]
> Sent: 27 April 2001 19:54
> To: Dave Page
> Cc: 'pgsql-cygwin@postgresql.org'
> Subject: Re: [CYGWIN] Initdb and IpcMemoryCreate Errors
>
>
Jason,
>
> Can you create files in /tmp?  What happens when you try the
> following:
>
>     $ >/tmp/foo

Yes, I can touch files, pipe to files, anything you'd expect to be able to
do except run initdb!

> > I have found that modifying initdb to use "initdb.$$" instead of
> > "/tmp/initdb.$$" resolves this problem. I have checked
> permissions on /tmp
> > and that there are no existing files in there which may
> cause grief and all
> > appears OK.
>
> I would not recommend the above approach.  Instead, I
> strongly recommend
> finding the root cause to your problem.  Especially, when it
> most likely
> also relates to your second problem...

Oh, I quite agree it's not an acceptable solution. However, as workaround it
does get over the problem of the temp file not being created correctly, and
possibly provide further insight into what may be going wrong.

> > The second problem occurs when I attempt to start the
> postmaster - I get the
> > following error:
> >
> > PC20 /data $ postmaster -i &
> > [1] 1484
> > PC20 /data $ IpcMemoryCreate: shmget(key=5432001,
> size=1245184, 03600)
> > failed: Not enough memory
>
> Guess where cygipc stores its files?  In /tmp:
>
>     $ ls /tmp/cygipc? /tmp/MultiFile*
>     /tmp/MultiFileMsg  /tmp/MultiFileShm  /tmp/cygipc1
>     /tmp/MultiFileSem  /tmp/cygipc0       /tmp/cygipc2

Yeah, no problem there - that had me stumped as well. Why can ipc-daemon
write to /tmp when initdb can't when run as the same user from the same
bash? Bizarre...

> BTW, you may want to try Cygwin 1.3.1 (i.e., the latest release) or a
> different snapshot.  I personally tested Cygwin 1.3.1 and 20010413 and
> both pass all regression tests.

I will download the latest version and try it. This is very perplexing,
particuarly as I've been running PostgreSQL 7.0 on Cygwin B20 for ages
without trouble!

I'll let you know how I get on...

Many thanks, Dave.

pgsql-cygwin by date:

Previous
From: Fred Yankowski
Date:
Subject: Re: Initdb and IpcMemoryCreate Errors
Next
From: Dave Page
Date:
Subject: RE: Initdb and IpcMemoryCreate Errors