2012-11-09 120 views
-1

我在mac狮子上设置postgresql。升级到最新版本后,我进入了以下内容:postgres安装错误mac lion

initdb /usr/local/var/postgres 

然后我遇到了以下错误:

The files belonging to this database system will be owned by user "michael". 
This user must also own the server process. 

The database cluster will be initialized with locale en_US.UTF-8. 
The default database encoding has accordingly been set to UTF8. 
The default text search configuration will be set to "english". 

creating directory /usr/local/var/postgres ... ok 
creating subdirectories ... ok 
selecting default max_connections ... 10 
selecting default shared_buffers ... 400kB 
creating configuration files ... ok 
creating template1 database in /usr/local/var/postgres/base/1 ... FATAL: could not create shared memory segment: Cannot allocate memory 
DETAIL: Failed system call was shmget(key=1, size=2138112, 03600). 
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space, or exceeded your kernel's SHMALL parameter. You can either reduce the request size or reconfigure the kernel with larger SHMALL. To reduce the request size (currently 2138112 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections. 
    The PostgreSQL documentation contains more information about shared memory configuration. 
child process exited with exit code 1 
initdb: removing data directory "/usr/local/var/postgres" 
+0

Pg版?你是如何安装PostgreSQL的?旧版本是...?你**是否搜索错误信息**? http://www.google.com/search?q=postgresql+%22could+not+create+shared+memory+segment%3A+Cannot+allocate+memory%22。以下是手动链接:http://www.postgresql.org/docs/current/static/kernel-resources.html –

回答