pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Schroeder <kschroeder@mirageworks.com>
To: pgsql-admin@postgresql.org
Subject: Re: Shared memory error using initdb on Solaris 8
Date: Fri, 21 May 2004 12:01:02 -0500
Message-ID: <406e01c43f55$32d6bb40$0200a8c0@WORKSTATION> (raw)
References: <20040521155715.E15B0430E@jimsun.LinxNet.com>

There we go.  For reference, what page did you get that info and what did
you search for to get it?

Kevin

----- Original Message ----- 
From: "Jim Seymour" <jseymour@LinxNet.com>
To: <pgsql-admin@postgresql.org>
Sent: Friday, May 21, 2004 10:57 AM
Subject: Re: [ADMIN] Shared memory error using initdb on Solaris 8


> >
> > 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html




view thread (5+ messages)  latest in thread

Message-ID: <406e01c43f55$32d6bb40$0200a8c0@WORKSTATION>
Permalink:  ../406e01c43f55$32d6bb40$0200a8c0@WORKSTATION/
Also on:    postgresql.org/message-id/406e01c43f55$32d6bb40$0200a8c0@WORKSTATION

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: kschroeder@mirageworks.com
  Subject: Re: Shared memory error using initdb on Solaris 8
  In-Reply-To: <406e01c43f55$32d6bb40$0200a8c0@WORKSTATION>
  References: <20040521155715.E15B0430E@jimsun.LinxNet.com> <406e01c43f55$32d6bb40$0200a8c0@WORKSTATION>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox