Re: OS X Tiger, and PostgreSQL 8.2 don't mix?

From: Chris Mair <chrisnospam(at)1006(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: OS X Tiger, and PostgreSQL 8.2 don't mix?
Date: 2006-12-28 07:58:36
Message-ID: 20061228085836.87c1eb79.chrisnospam@1006.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I have OS X tiger with all the updates:
>
> uname -r
> 8.8.0
>
> Here is what I get when I try to initdb on a freshly compiled 8.2:
>
> selecting default max_connections ... 10
> selecting default shared_buffers/max_fsm_pages ... 400kB/20000
> creating configuration files ... ok
> creating template1 database in /usr/local/pgsql/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
>

Works for me :|
(see initdb output below)...

>
> I read the documentation
> (http://www.postgresql.org/docs/8.2/static/kernel-resources.html) and
> added the appropriate items to /etc/sysctl.conf, and I rebooted for it
> to take effect.
>
> cat /etc/sysctl.conf
> kern.sysv.shmmax=4194304
> kern.sysv.shmmin=1
> kern.sysv.shmmni=32
> kern.sysv.shmseg=8
> kern.sysv.shmall=1024

Can you check whether the settings worked? Do:

ibook:~ chris$ sysctl -a | grep shm
kern.sysv.shmmax: 4194304
kern.sysv.shmmin: 1
kern.sysv.shmmni: 32
kern.sysv.shmseg: 8
kern.sysv.shmall: 1024

Bye,
Chris.

---------------------------------------------------------------------
ibook:/opt/pg chris$ initdb
The files belonging to this database system will be owned by user "chris".
This user must also own the server process.

The database cluster will be initialized with locale C.

creating directory /opt/pg/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 30
selecting default shared_buffers/max_fsm_pages ... 2400kB/20000
creating configuration files ... ok
creating template1 database in /opt/pg/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

postgres -D /opt/pg/data
or
pg_ctl -D /opt/pg/data -l logfile start

ibook:/opt/pg chris$ uname -r
8.8.0
---------------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Piotr Szałamacha 2006-12-28 09:03:31 questions about migrating form postgres 7 to 8
Previous Message Karen Hill 2006-12-28 07:02:40 OS X Tiger, and PostgreSQL 8.2 don't mix?