我试图在本地机器上启动我的PostgreSQL服务器。 但我得到一个错误信息说:在MAC OS X 10.6上为PostgreSQL设置SHMMAX等值
FATAL: could not create shared memory segment: Invalid argument
DETAIL: Failed system call was shmget(key=5432001, size=9781248, 03600).
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 9781248 bytes), reduce PostgreSQL's shared_buffers parameter (currently 1024) and/or its max_connections parameter (currently 13).
If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared memory configuration.
我搜索,看着文档,但一切,我试图有关设置kern.sysv.shmmax和kern.sysv.shmall工作。 雪豹的正确设置是什么?我用macports安装了postgres。
尝试在serverfault.com上询问。 – pilcrow 2010-01-06 23:02:30
这里是链接到同一个问题在serverfault:http://serverfault.com/questions/10226/how-to-set-the-shmmax-parameter-on-mac-os-x – wallyqs 2010-11-21 06:46:13
更新:Postgres 9.3及更高版本已被重写为只需要少量的共享内存。当使用> = 9.3时,不再需要调整内核共享内存限制。 http://www.depesz.com/2012/07/12/waiting-for-9-3-dramatically-reduce-system-v-shared-memory-consumption/ – 2013-05-08 19:18:58