Re: IpcMemoryCreate: shmget failed (Invalid argument)

Поиск
Список
Период
Сортировка
От James Thornton
Тема Re: IpcMemoryCreate: shmget failed (Invalid argument)
Дата
Msg-id 3AEB24BC.52639E7E@unifiedmind.com
обсуждение исходный текст
Ответ на IpcMemoryCreate: shmget failed (Invalid argument)  (James Thornton <james@unifiedmind.com>)
Список pgsql-general
James Thornton wrote:

> I get this error when trying to start postgres with a block size > the
> default of 64...
>
> [postgres@roam pgsql]$ /usr/local/pgsql/bin/postmaster -B 2000 -D
> /usr/local/pgsql/data
> IpcMemoryCreate: shmget failed (Invalid argument) key=5432001,
> size=33652736, permission=600
> This type of error is usually caused by an improper
> shared memory or System V IPC semaphore configuration.
> For more information, see the FAQ and platform-specific
> FAQ's in the source directory pgsql/doc or on our
> web site at http://www.postgresql.org.
> FATAL 1:  ShmemCreate: cannot create region
>
> I am running PG 7.03, and I assume that you'll want to need to know my
> OS...
>
> [postgres@roam pgsql]$ uname -a
> Linux roam 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686 unknown
>
> (RedHat 6.2)

I found the solution at
http://www.ca.postgresql.org/devel-corner/docs/postgres/kernel-resources.html#SYSVIPC-PARAMETERS

In a nutshell...

(regarding GNU/Linux)

The default shared memory limit (both SHMMAX and SHMALL) is 32 MB in 2.2 kernels, but it can be changed in the proc
filesystem (without reboot). For example, to allow 128 
MB:

$ echo 134217728 >/proc/sys/kernel/shmall
$ echo 134217728 >/proc/sys/kernel/shmmax

    NOTE: 134217728 = 128 * 1024 * 1024

You could put these commands into a script run at boot-time.

Alternatively, you can use sysctl, if available, to control these parameters. Look for a file called /etc/sysctl.conf
andadd lines like the following to it: 

kernel.shmall = 134217728
kernel.shmmax = 134217728

This file is usually processed at boot time, but sysctl can also be called explicitly later.

Other parameters are sufficiently sized for any application. If you want to see for yourself look into
/usr/src/linux/include/asm-xxx/shmparam.hand 
/usr/src/linux/include/linux/sem.h.

- JT
________________________________________
James Thornton, http://jamesthornton.com




В списке pgsql-general по дате отправления:

Предыдущее
От: Chris Jones
Дата:
Сообщение: Re: Re: a primer on trigger?
Следующее
От: Fabrice Scemama
Дата:
Сообщение: Re: Re: How to install on Windows?