-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Postgres install incomplete; needs to update shared memory settings #14527
Comments
Even more cool: a pull request |
If it requires root to change these settings, we can't do it in the formula. |
Also, if this is required, why is this the first we are hearing of it? We've packaged Postgres for years. |
Why it hasn't been reported before I don't know, but the documentation online, while fragmented, is pretty specific. I've personally used brew to install postgres on 4 different macs running lion and mountain lion and alway run into this issue. Further, the official installer takes this step. |
We're not going to start editing /etc/sysctl.conf in a formula. |
Well… okay, I guess it is a pretty major step to take. I was creeped out by it too, but it is required to make postgres work (as far as I can tell – I'd love to be proven wrong). Instead of updating the formula, can I suggest just adding to the |
Add it to the caveats by all means. But I'm as surprised as Jack that nobody has brought this up before. |
This might be system-specific. I have postgres installed on my home machine and definitely didn't have to do this. My work machine, on the other hand, has a specific complaint about
when I attempted to From the caveats we already print:
|
Maybe instead of rising the kernel settings, could the PostgreSQL requirements be lowered? |
i had a similar error, but checking /usr/local/var/postgres/server.log i saw it was repetitively looking for a postgresql.conf file that it couldn't find. |
Looks to me like you aren't using the l bet this has nothing to do with shared memory and that if you run |
Some background for the previous comment: Lion and newer ship with a |
And for a practical example, see the following thread on the Homebrew mailing list: |
|
Note that the original issue with shared memory will apparently be resolved in 9.3: http://rhaas.blogspot.ca/2012/06/absurd-shared-memory-limits.html |
Closing without taking action. Will review caveat updates for 9.2.x, or wait until this is mooted in 9.3. The caveats for Postgresql are already huge; would be nice to strip them down, point to a URL somewhere, or install our own post-install.txt and tell the user how to find it. |
FWIW, I'm seeing this on a new MBP with 10.8.2 trying to run 9.2.3. Sure would be nice to add this to caveats (or, better yet, use 9.3). |
Umm... 9.2.1 of course, not 9.2.3. |
This just happened to me. I couldn't make it run at all (not understanding what exactly I was doing I ran the 'start', 'stop', 'launch at startup' command lines but postgresql wouldn't start), so I uninstalled the 9.2.1 version. Now, I cannot run my original brew install (9.1.2, 9.1.3). $ which psql Which shouldn't be, I installed postgres via homebrew on clean Mac (OS X 10.7.5 now). |
fwiw same deal on my new mba 11". installed via brew, postgres (PostgreSQL) 9.2.4 on a 10.8.4 system. will update with soln. once i figure it out. |
fix for me was to, in addition to modifying the memory settings, adding this to my bash_profile
|
|
I upgraded to Yosemite. I did the steps above and it worked! Thanks! |
@azouariUTD Just upgraded to Yosemite too. Exactly which steps did you try to get it working? |
@azouariUTD, yup which steps? Mine does not work anymore after a Yosemite upgrade. I am also using lunchy as manager, which still seems able to start the process but psql can't find it anymore. |
@mbannert and @bobmacneal (In my case since this was a testing environment I went ahead and re-installed PostgreSQL from scratch) Don't forget to run brew prune if you uninstall and re-install. |
Issue
Postgres, installed via brew, fails to start with the message:
steps to repeat
brew install postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
psql
Postgres CLI should open, but instead fails with the error message above.
The problem
The postgres-for-mac installer readme states the following:
The brew formula doesn't do this step, and postgres will just silently fail to start. It would be super-awesome-coolio if brew was smart enough to run the same script that the postgres installer runs to setup the shared memory settings.
Less cool, but still super useful, would be adding this step to the documentation.
The text was updated successfully, but these errors were encountered: