我試圖在本地機器上啓動我的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