X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 96DAFD1B1C7 for ; Fri, 21 May 2004 12:57:36 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 23970-03 for ; Fri, 21 May 2004 12:57:16 -0300 (ADT) Received: from jimsun.LinxNet.com (jimsun.linxnet.com [64.32.196.134]) by svr1.postgresql.org (Postfix) with ESMTP id 3D284D1B238 for ; Fri, 21 May 2004 12:57:16 -0300 (ADT) Received: by jimsun.LinxNet.com (Postfix, from userid 332) id E15B0430E; Fri, 21 May 2004 11:57:15 -0400 (EDT) To: pgsql-admin@postgresql.org Subject: Re: Shared memory error using initdb on Solaris 8 Reply-To: pgsql-admin@postgresql.org Message-Id: <20040521155715.E15B0430E@jimsun.LinxNet.com> Date: Fri, 21 May 2004 11:57:15 -0400 (EDT) From: jseymour@LinxNet.com (Jim Seymour) X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/229 X-Sequence-Number: 13545 > > Hello, > 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: > [snip] > 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. [snip] > > When I run ulimit -a I get > [snip] 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 > size. 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: /etc/system set shmsys:shminfo_shmmax=0x2000000 (33554432 decimal) set shmsys:shminfo_shmmin=1 set shmsys:shminfo_shmmni=256 set shmsys:shminfo_shmseg=256 set semsys:seminfo_semmap=256 set semsys:seminfo_semmni=512 set semsys:seminfo_semmns=512 set semsys:seminfo_semmsl=32 I arrived at the above values from Google'ing. Jim