2012-11-09 145 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 –

回答