Re: Initdb and IpcMemoryCreate Errors

Поиск
Список
Период
Сортировка
От Jason Tishler
Тема Re: Initdb and IpcMemoryCreate Errors
Дата
Msg-id 20010427145404.F308@dothill.com
обсуждение исходный текст
Ответ на Initdb and IpcMemoryCreate Errors  (Dave Page <dpage@vale-housing.co.uk>)
Ответы Re: Initdb and IpcMemoryCreate Errors
Список pgsql-cygwin
Dave,

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

--
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.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

В списке pgsql-cygwin по дате отправления:

Предыдущее
От: Jason Tishler
Дата:
Сообщение: Re: postgresql fails to fork backend
Следующее
От: Fred Yankowski
Дата:
Сообщение: Re: Initdb and IpcMemoryCreate Errors