Re: initdb problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Barwell <jbar(at)es(dot)co(dot)nz>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: initdb problem
Date: 2007-06-22 00:37:27
Message-ID: 9856.1182472647@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Joe Barwell <jbar(at)es(dot)co(dot)nz> writes:
> acorn$ sysctl -a | grep shm
> kern.sysv.shmmax: 4194304
> kern.sysv.shmmin: 1
> kern.sysv.shmmni: 32
> kern.sysv.shmseg: 8
> kern.sysv.shmall: 1024

OK, so you should be able to do 4MB without problems.

> acorn$ sudo ipcs -a
> Password:
> sudo: ipcs: command not found

>> Also, which OSX release is this again?

> 10.3.9 on a g4.

Ugh. I don't recall exactly when Apple got around to including ipcs,
but I guess it wasn't in 10.3.9. Your problem is that you're flying
blind because you cannot tell what's going on in shared memory.

What I suspect is that there's an unused shared memory segment sitting
there (perhaps left over from a failed initdb) and eating a sufficiently
large fraction of SHMALL that there's no room for another. If correct,
then rebooting should make it go away and let you initdb. Since you
haven't got ipcrm either, there's basically no other way to get rid of
an unwanted shmem segment :-(

You should think about upgrading to 10.4.x btw --- for Postgres admin
purposes, having ipcs and ipcrm available is alone worth the price of
admission. And it does seem they've improved the OS's performance in
various ways too.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Joe Barwell 2007-06-22 01:38:22 Re: initdb problem
Previous Message Joe Barwell 2007-06-22 00:16:02 Re: initdb problem