Skip site navigation (1) Skip section navigation (2)

RE: Initdb and IpcMemoryCreate Errors

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: "'Jason Tishler'" <Jason(dot)Tishler(at)dothill(dot)com>
Cc: "'pgsql-cygwin(at)postgresql(dot)org'" <pgsql-cygwin(at)postgresql(dot)org>
Subject: RE: Initdb and IpcMemoryCreate Errors
Date: 2001-04-27 19:53:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-cygwin

> -----Original Message-----
> From: Jason Tishler [mailto:Jason(dot)Tishler(at)dothill(dot)com]
> Sent: 27 April 2001 19:54
> To: Dave Page
> Cc: 'pgsql-cygwin(at)postgresql(dot)org'
> Subject: Re: [CYGWIN] Initdb and IpcMemoryCreate Errors
> 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

Next:From: Dave PageDate: 2001-04-27 20:06:31
Subject: RE: Initdb and IpcMemoryCreate Errors
Previous:From: Fred YankowskiDate: 2001-04-27 19:21:51
Subject: Re: Initdb and IpcMemoryCreate Errors

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group