Tuesday, October 29, 2013

PostgeSQL does not start with "FATAL: too many private dirs demanded" in postmaster.log

There is a bug in recent Gentoo-installations, which prevents start of PostgreSQL-server. I don't know exactly where does it come from, but i encounter this bug several times on different maschines: there is a link named "posix" under /usr/share/zoneinfo, which targets to ".", so scanning this directory will end in an infinite directory depth (this is what postgres prevents from starting). You can also locate this directory by searching for it with:

$ find -L /usr/share/zoneinfo/

"find" will stop, if it has found a loop.

Solution:

Simply remove the link and postgres will start again.