Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[DOCS] Issue with SHMALL parameter

13 views
Skip to first unread message

data tanger

unread,
Sep 18, 2012, 9:59:53 AM9/18/12
to
Hi,

I'm using postgresql 9.1 as my database server on a linux server that has 8 GB of RAM.

After I changed the shared_buffers parameter to 2GB, I get the following error when I try to start postgres:

FATAL:  could not create shared memory segment: Cannot allocate memory
DETAIL:  Failed system call was shmget(key=5432001, size=2221539328, 03600).

Here are the shmall and the shmax params of my server:

#cat /proc/sys/kernel/shmmax     
68719476736

#cat /proc/sys/kernel/shmall     
4294967296

So as you see, shmall is greater than the requested size by postgres. Anyone have and idea?

thank you

Tom Lane

unread,
Sep 18, 2012, 12:07:46 PM9/18/12
to
data tanger <datat...@hotmail.fr> writes:
> Here are the shmall and the shmax params of my server:
> #cat /proc/sys/kernel/shmmax 68719476736
> #cat /proc/sys/kernel/shmall 4294967296

SHMALL is measured in pages not bytes on Linux. I wonder if that value
is too large and is causing an internal integer overflow in the kernel.

regards, tom lane


--
Sent via pgsql-docs mailing list (pgsql...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

data tanger

unread,
Sep 18, 2012, 2:07:54 PM9/18/12
to
Thank you for your answer. I think the value of shmall I have is very common cause I've seen it many times in other servers.
Do you think there maybe a link between the request size of postgres and the swap size?

Here is the output of free -m

free -m
             total       used       free     shared    buffers     cached
Mem:          7867       1860       6007          0          5        595
-/+ buffers/cache:       1258       6609
Swap:         1023          2       1021

Regards,
0 new messages