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

Re: Initdb and IpcMemoryCreate Errors

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

On Wed, Apr 25, 2001 at 01:56:58PM +0100, Dave Page wrote:
> I have 2 problems with PostgreSQL 7.1-2 (precompiled) and Cygwin 1.1.8 (I
> know the docs say don't use this version, however I can't find 1.1.7
> anywhere) - I have upgraded to the 20010423 snapshot of cygwin1.dll. The
> first problem (which I can work around) is with initdb which gives the
> following output:
> PC20 /data $ initdb
> This database system will be initialized with username "administrator".
> This user will own all the data files and must also own the server process.
> [snip]
> /usr/bin/initdb: cannot create /tmp/initdb.1468: permission denied
> /usr/bin/initdb: cannot create /tmp/initdb.1468: permission denied

Can you create files in /tmp?  What happens when you try the following:

    $ >/tmp/foo

> cat: /tmp/initdb.1468: Permission denied
> Setting lastsysoid.
> Vacuuming database.
> initdb failed.
> Removing temp file /tmp/initdb.1468.
> 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...

> 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

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.


Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason(dot)Tishler(at)dothill(dot)com
Hazlet, NJ 07730 USA                 WWW:

In response to


pgsql-cygwin by date

Next:From: Fred YankowskiDate: 2001-04-27 19:21:51
Subject: Re: Initdb and IpcMemoryCreate Errors
Previous:From: Jason TishlerDate: 2001-04-27 18:26:30
Subject: Re: Error INITDB

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