> I'm trying to install PostgreSQL 7.4.2 on a brand new SunFire 120 with
> 2GB of RAM but when I run initdb -D /usr/local/pgsql/data I get the
> following error:
> creating template1 database in /usr/local/pgsql/data/base/1... FATAL: could
> not create shared memory segment: Invalid argument
> DETAIL: Failed system call was shmget(key=1, size=1081344, 03600).
> HINT: This error usually means that PostgreSQL's request for a shared
> memory segment exceeded your kernel's SHMMAX parameter.
> When I run ulimit -a I get
You're looking at the wrong thing. You need to do:
sysdef |egrep -i 'shm|sem'
> There does not seem to be an option in initdb to reduce the shared buffers
It tries to reduce things as far as it "sanely" can to fit within
what's available. You can hand-tweak initdb to over-ride its
limits, but you'd end-up with a sub-optimal installation.
> Plus, with 2GB of RAM I don't know that I'd want to go below the
> "lowest common denominator" that Postgres defaults to.
Nope. You need to adjust certain values by placing settings in
/etc/system and rebooting. I use:
set shmsys:shminfo_shmmax=0x2000000 (33554432 decimal)
I arrived at the above values from Google'ing.
pgsql-admin by date
|Next:||From: Kevin Schroeder||Date: 2004-05-21 17:01:02|
|Subject: Re: Shared memory error using initdb on Solaris 8|
|Previous:||From: Kevin Schroeder||Date: 2004-05-21 15:15:34|
|Subject: Shared memory error using initdb on Solaris 8|