Postgres 9.4 failed to start in container – How to Fix

After upgrading Postgres to version 9.4 in VM using container service failed to start with following message:

 /etc/init.d/postgresql start
[....] Starting PostgreSQL 9.4 database server: main[....] The PostgreSQL server failed to start. ...
 FATAL: could not open shared memory segment "/PostgreSQL.1804289383": Permission denied ... failed!

Quick search pointed to lack of shared memory, but I had more than enough.

It turned that fix is to change dynamic_shared_memory_type from posix to none.

vi /etc/postgresql/9.4/main/postgresql.conf
...
dynamic_shared_memory_type = none 
...

and I was able to start

/etc/init.d/postgresql start
[ ok ] Starting PostgreSQL 9.4 database server: main.

Source: http://www.postgresql.org/message-id/CAOtHd0DPtxDT-cwYGYr1DtdL6nc7NCmc8RT+6xujOGf3wHwg7w@mail.gmail.com

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.