Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Also worth noting for those who are starting out with PostgreSQL: The easiest way to install it on your Mac is using Postgres.app (http://postgresapp.com).


As much I like mattt's work, I dont understand, why is this needed. brew install postgres is just as easy and in my experience Postgres.app is not well maintained and uses an older version.


I've personally helped 4 people setup Postgres on a recent model macbook with OSX Mountain Lion for Rails dev in the last 6 months. Every one has been terrible. Issue with sockets, issues with file permissions, issues with previous attempted installs, issues with setting up database users. Postgres.app just works and it is awesome.


Thats interesting, I've never had an issue with the homebrew installation. The readme details 1 or 2 lines to get everything set up for the first time.

I suppose osx built-in installation may cause conflicts.


here is the one I was having,

http://stackoverflow.com/questions/12472988/postgres-could-n...

postgres app fixed it


> I suppose osx built-in installation may cause conflicts.

This is a consistent source of trouble when installing Postgres. Usually, this involves looking up the right places to modify the path and sometimes needing to change permissions/ports.


To be honest I've spent about 4 hours last week trying to install homebrew PostgreSQL on a friends MacBook ... it took me forever to figure out why it wasn't connecting to the right socket, just because he had some things out of date :\

While it is really easy to install most of the time, I'd say the Postgres.app works well for people who aren't developers but need to use PostgreSQL.


Did you see the post installation instructions to initialize a db?

initdb /usr/local/var/postgres -E utf8

Also if you are working with rails, add host: localhost in your database.yml file and remove the user password. That should be all you need.


Postgres.app uses the latest stable version of Postgres (9.2.4), so I don't know what you mean.

http://postgresapp.com/


Not everyone is comfortable with the command line, so this is great for people like them. Also, and it may be isolated to me, but my brew formulae get screwed up all the time, and it's a decent sized challenge to get back to working if you're only a git novice. And sometimes, all you need is Postgres, and not the overhead of brew. No sense introducing stuff you don't need.


> Not everyone is comfortable with the command line, so this is great for people like them.

This is probably "elitist" of me but I feel like someone who isn't comfortable with the command line should be learning that before they tackle Postgres.


i have had multiple problems with brew install postgres. it installs the code just fine but you get weird errors when trying to start the server and connect to it with the psql client


It's a pain to upgrade using this.


For my Mac, I typically use the enterprise graphical install[1].

If you're comfortable with command line, you really can't go wrong on most Linux flavors with the great documentation on the project website[2].

[1] http://www.enterprisedb.com/products-services-training/pgdow...

[2] http://www.postgresql.org/docs/9.2/static/install-procedure....


It would be much better to keep it all inside a local VM.


If your purpose is to emulate your production environment fully, then yes. But if you're in the development phase weeks or months before going live, a virtual machine often has no real purpose and takes up a lot of RAM.


I disagree. Just look at the people in this thread asking how to install it. In a VM you will mimic what you will eventually do, and installation is an apt-get or yum away.

If someone is learning off of, say, Windows, their experience may possibly be quite different to what they will experience if they run this within a VM.


Just look at the people in this thread asking how to install it

They are talking about how other installation methods than Postgres.app can be difficult. Which is exactly my point: If you're on Mac and you want to get started with PostgreSQL easily, Postgres.app is the way to go.


That may be the easiest way, but if your intention is to do serious, heavy-duty work with PostgreSQL, please do yourself a favor and learn how to compile and install from source.


I've done some benchmarks with millions of rows, and a default PostgreSQL installed via apt-get on Ubuntu works fine. I doubt whether the majority of PostgreSQL users really need to install from source (especially considering how much harder it makes upgrades).


I didn't say it was faster, and I didn't say the majority needed to do it.

The reason is to be able to customize your build and/or apply patches. Tom Lane fixed a production bug I reported in hours and this got me running fairly quickly.


Where do people get this weird idea that typing "make" creates some sort of magic that makes the software faster or more stable or somehow better than having someone else type "make"?


Where did I say it was faster or more stable?


I said: "faster or more stable or somehow better". Obviously you must believe that typing make causes one of those things, or you wouldn't have made your comment.


> Obviously you must believe that typing make causes one of those things, or you wouldn't have made your comment.

Or: https://news.ycombinator.com/item?id=6246393


That doesn't support your original statement at all. If you made the statement in error, then simply say so.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: