IpcMemoryCreate: shmget failed (Invalid argument)
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)
Thanks.
- JT
________________________________________
James Thornton, http://jamesthornton.com
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 regionI 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 file system (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 and add 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.h and
/usr/src/linux/include/linux/sem.h.
- JT
________________________________________
James Thornton, http://jamesthornton.com
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
Perhaps someone should write a platform-specific FAQ for Linux that
answers this question, so that the link provided would actually be useful.
If there are no other takers, I'll volunteer.
steve
Steve Wolfe writes:
Perhaps someone should write a platform-specific FAQ for Linux that
answers this question, so that the link provided would actually be useful.
http://www.ca.postgresql.org/devel-corner/docs/postgres/kernel-resources.html#SYSVIPC
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
Perhaps someone should write a platform-specific FAQ for Linux that
answers this question, so that the link provided would actually be
useful.
http://www.ca.postgresql.org/devel-corner/docs/postgres/kernel-resources.h
tml#SYSVIPC
Perhaps it should be put in the platform-specific FAQ's, since that's
where users are pointed when they get the error.
steve
[ Charset ISO-8859-1 unsupported, converting... ]
Perhaps someone should write a platform-specific FAQ for Linux that
answers this question, so that the link provided would actually beuseful.
http://www.ca.postgresql.org/devel-corner/docs/postgres/kernel-resources.h
tml#SYSVIPCPerhaps it should be put in the platform-specific FAQ's, since that's
where users are pointed when they get the error.
But we moved all the platform-specific kernel stuff to the
administrator's manual. I will update the error message.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
I just checked and 7.1 has the proper mention of the Administrator's
Guide.
[ Charset ISO-8859-1 unsupported, converting... ]
Perhaps someone should write a platform-specific FAQ for Linux that
answers this question, so that the link provided would actually beuseful.
http://www.ca.postgresql.org/devel-corner/docs/postgres/kernel-resources.h
tml#SYSVIPCPerhaps it should be put in the platform-specific FAQ's, since that's
where users are pointed when they get the error.steve
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026