Thread: could not create semaphores : No space left on device = FreeBSD port install error!
could not create semaphores : No space left on device = FreeBSD port install error!
From
Miles Keaton
Date:
I'm posting this here for search-engine's sake, so future people having this same problem can find the solution here. After installing PostgreSQL from FreeBSD's ports, and running su - pgsql -c initdb for the first time, I got this common error: could not create semaphores : No space left on device This page: http://www.postgresql.org/docs/current/static/postmaster-start.html ... and many others tell you to recompile your kernel with different System V semaphores limits. I knew this couldn't be it, because I had installed PostgreSQL successfully on many FreeBSD laptops and desktops. I tried uninstalling and re-installing. No luck. Same error when running initdb. Then I went into "top" and made sure to entirely kill all active postgresql processes. Then I ran initdb again and everything was fine. So --- I think if you install PostgreSQL from FreeBSD ports, and start the server, and THEN run initdb, it will give you this error. If you make sure that ALL PostgreSQL processes are stopped (see ps aux or top) -- then it should work fine.
Re: could not create semaphores : No space left on device = FreeBSD port install error!
From
Tom Lane
Date:
Miles Keaton <mileskeaton@gmail.com> writes: > So --- I think if you install PostgreSQL from FreeBSD ports, and start > the server, and THEN run initdb, it will give you this error. What this says is that you're running PG with settings that use up more than half of the kernel's default limit on the number of semaphores. So you can't start two postmasters concurrently. regards, tom lane