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

Re: initdb problem

From: Joe Barwell <jbar(at)es(dot)co(dot)nz>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: initdb problem
Date: 2007-06-22 01:38:22
Message-ID: 467b280e.26e.6f03.423851873@ihug.co.nz (view raw or flat)
Thread:
Lists: pgsql-admin
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> 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.

Hi Tom,

I get the same result trying  to initdb after rebooting, the
end of which is:

fixing permissions on existing directory
/Library/PostgreSQL8/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers/max_fsm_pages ...
400kB/20000
creating configuration files ... ok
creating template1 database in
/Library/PostgreSQL8/data/base/1 ... FATAL:  could not
create shared memory segment: Cannot allocate memory
DETAIL:  Failed system call was shmget(key=2, size=1646592,
03600).
HINT:  This error usually means that PostgreSQL's request
for a shared memory segment exceeded available memory or
swap space. To reduce the request size (currently 1646592
bytes), reduce PostgreSQL's shared_buffers parameter
(currently 50) and/or its max_connections parameter
(currently 10).
        The PostgreSQL documentation contains more
information about shared memory configuration.
child process exited with exit code 1
initdb: removing contents of data directory
"/Library/PostgreSQL8/data"

----

Does the size=1646592 bit mean it's ignoring my
/etc/sysctl.conf file?

> 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.

Out of my hands, it's not my computer to upgrade. <shrug>
Not even sure if a g4 will run 10.4.x, will it?

Cheers!

Joe

Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2007-06-22 02:08:02
Subject: Re: initdb problem
Previous:From: Tom LaneDate: 2007-06-22 00:37:27
Subject: Re: initdb problem

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