вівторок, 20 грудня 2011 р.

[Вирішено!] Postgresql хоче більше пам'яті (could not create shared memory segment)

При черговому апгрейді postresql 9.1 на ноутбуці (Ubuntu 10.04LTS Linux), отримав:

Налаштовування postgresql-9.1 (9.1.2-1~lucid) ...
* Starting PostgreSQL 9.1 database server
* The PostgreSQL server failed to start. Please check the log output:
2011-12-20 19:51:25 EET FATAL:  could not create shared memory segment: Invalid argument
2011-12-20 19:51:25 EET DETAIL:  Failed system call was shmget(key=5433001, size=39337984, 03600).
2011-12-20 19:51:25 EET 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 39337984 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.

Відповідно Google одразу ж знайшов як цього позбутись (робимо copy-paste в улюблений термінал (Ctrl+c => Ctrl+Shift+v):
cp /etc/sysctl.conf /etc/sysctl.conf-orig
sudo sh -c 'echo "#\n# Це потрібно для postgres:\nkernel.shmmax = 104857600" >> /etc/sysctl.conf'
sudo sysctl -p
Tепер можна завершити інсталяцію (я полюбляю aptitude)

Шануйтеся! :)

Немає коментарів:

Дописати коментар