0

我正在慢慢自学 django,我正在使用 postgres 9.2

此前,大约 2 周前,我通过自制软件成功安装并创建了我的数据库。

现在当我输入

postgres -D /usr/local/var/postgres

我得到这个结果

FATAL:  could not create shared memory segment: Invalid argument
DETAIL:  Failed system call was shmget(key=5432001, size=32374784, 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 32374784 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
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.

同时,我确实更改了 /ect/sysctl.conf 中的内存配置并在更改后重新启动 - 但我仍然收到相同的错误。

为什么会发生这种情况,我该怎么做才能阻止它?(如果这有帮助,我正在使用 Mac OS X Mountain lion)

4

0 回答 0