Postgres.app is the easiest way to get started with PostgreSQL on the Mac. Open the app, and you have a PostgreSQL server ready and awaiting new connections. Close the app, and the server shuts down.
Postgres.app will be distributed through the Mac App Store, with a separate build containing the latest PostgreSQL beta available for direct download from the website.
+1 I have done 'brew install postgres' for a long while but I just switched to running this app. I run a lot of data stores on my MB Air (postgresql, mongodb, couchdb, mysql, and more rarely hbase and cassandra) for development. Having postgresql an easy startup app is a little bit more convenient. I also like the CouchDB server Mac app, unless I need bigcouch instead.
Thanks to the developers who put the app together.
Error: Failed executing: make install-world (postgresql.rb:67)
Now I have 2 options. I can continue googling this error and trying all the random solutions (fyi, none of them worked, and I spent a solid 2 hours trying all of them) or I can install postgresql.app and get back to doing actual work. I chose #2.
brew was a big step forward. But 1 step (download postgres.app) is better than 3 (install devtools, install brew, brew install postgres).
We saw that many developers were using SQLite (or MySQL) on their local machines, but Postgres on Heroku. This led to frustrating and hard to diagnose bugs and behaviors in their apps. Our hypothesis is that easier local install will lead to more widespread usage for the technology.
This will definitely lead to more people using Postgres on their OS X setups, but what I wonder is whether it will lead to an overall better quality of development.
Let me try to articulate my point, but I could probably use some help:
I suspect that the sort of developers who were writing apps and using SQLite locally but deploying with Postgres were the sort of developers whom will still use shaky and poor development and deployment practices regardless of whether or not Postgres is available to them locally.
Orthogonally, I think that the kinds of developers who will actually take the time to follow best development and deployment practices probably wouldn't want to use an app like this - not because it isn't a nice and helpful app, but because they probably want to install the full always-on server bundle via 'brew'.
That's my guess anyway. Does this mean the app was a bad idea? No, definitely not. But I don't personally expect a huge uptick in Heroku deployment quality because of it. At least it definitely won't be for lack of trying!
I routinely use SQLite for development and deploy against PostgreSQL and MySQL (and others) and I don't think my development and deployment practices are either shaky or poor. I write tests, measure coverage, do continuous testing (including load testing and resource consumption goals) and the fancy technologies that allow me to target different databases with the same source code are nothing new: SQL and an ORM. I consider the fact the code isn't very tied to a given database implementation is a sign of high quality, not the other way around.
No doubt this app will appeal to the more casual developers. When the low-end of Dell is a 4-core x86-64 with more memory than most people will ever need, most non-casual developers who need to write code specific to a given database will have it starting up on boot.
Agreed. The pay off seems rather incremental but the playoffs are nuanced. A developer doesn't have to install it manually, and this is big for junior developers who may not have set up a sophisticated environment before. It also cuts down on set up time for new machines and new hires. Any bogus environmental issues go away and could regain 3-4 hours on day 1 getting into a new app.
Postgres performs and behaves differently too. Developers will be more conscious of vacuuming and analyzing their DBS, especially after large deletes, etc.
Overall it removes friction, regardless of how trivial, and helps commoditize the whole development and deployment cycle which is essentially herokus entire value proposition.
this is big for junior developers who may not have set up a sophisticated environment before. It also cuts down on set up time for new machines and new hires
This. I'm just getting started playing with Heroku as a hobby. I've not used Postgres before, so getting things set up correctly on my dev machine was not a "install one app, go" kind of experience. I spent at least an hour reading / trying / understanding. Having something like this would have meant 1 more hour of making, rather than trying to get Postgres setup.
For hobby (or any) projects, 1 extra hour doing what I want to do is a big deal. I'm only able to spend about 5 hours per week on my hobby, getting 20% of my time last week back would have been a big deal to me.
What do you want? If it's not homebrew, but also not an app, what does that leave? A pkg? Not really a step up from the other two. Or just a tarball with the source?
Yeah, sorry, probably a dumb comment. As somewhat of a sys admin newbie, it struck me as unfortunate that there wasn't something already available. I generally don't like installing things because I'm not sure what's being done and if I can easily and completely uninstall. But Brew is relatively safe?
No safer than any other method of running arbitrary code under your user account, or than any other package management tool with reasonable conventions about where it installs software.
If your goal is something that can easily and obviously be uninstalled completely, the App Store version sounds like exactly what you're looking for; Apple is pretty strict about what an App Store app can and can't do outside its sandbox.
Otherwise, I've been using the binary installers from PostgreSQL.org on OS X for years, and they work fine. They install everything into /Library/PostgreSQL, so they're self-contained, and the server starts/stops/can be set to auto-start easily with launchctl.
I agree it is not a bright question, but there is a third option: upgrade to Mac OS X Server. It apparently has a command-line PostgreSQL installation.
From what I can tell, the app defaults to (1) no password and (2) a base user of $USER. Maybe a better way to put it: whoever you install it as is the owner of the app's folder in /Applications. That will be your base user. I think they're assuming (as is most common) a single-user Mac environment. (The postmaster.opts file hardcodes the name of the Postgres.app owner in the path for the data directory. So I don't think this would work as a multi-user application. But maybe I'm misunderstanding the installation.)
Anyhow, start the app, open a psql shell with /Applications/Postgres.app/Contents/MacOS/bin/psql in a terminal window, and you get a session. Since (I think) the app is intended only for development use, I'm not sure if they intend for you to change those defaults. That's not to say that you shouldn't but just that the app is meant to be (nearly) zero conf. (The documentation suggests adding Applications/Postgres.app/Contents/MacOS/bin to $PATH, which is probably a good idea if you will use the command line tools often.)
But that wasn't what I meant. I meant /Applications/Postgres.app. That is owned by the user who installs it to /Applications. Here it is on my machine, for example:
Beyond that, you can login (with no password), this way:
achilles /$ /Applications/Postgres.app/Contents/MacOS/bin/psql
psql (9.1.4)
Type "help" for help.
achilles=#
I'm sure it works because I just did it. The setup is arguably insecure, but again I don't think it's meant to be a production database. It's meant, as I understand it, for a single developer to use while coding.
That would be essential. I just installed the thing + pgAdmin + Induction. I can't get it to work, because there they do not tell what the default user/pwd is...
Navicat is great, it has been surprisingly helpful to have the same database client app for all of the different DB systems (Postgres, MySQL, Sqlite) that I need to interact with.
A bit uglier but if you need to support quite a few databases maybe Razor is another good alternative. I've used it for years. It is not open source though.
Razor is actually quite impressive - I've made it the default SQL client tool for the team.
It works on Windows, OS X and Linux, connects to almost any RDBMS in existence, easily customizable and has tabbed results interface in addition to many other features.
All for $60-70. Easily worth the money, you can get a full trial for 30 days to see if it works for you.
Sequel Pro devs have long expressed an interest in Pg support but I've never seen any actual work being done. Anyone know if it's a stop on their roadmap yet?
It's cool that this exists, but when I do development local to my mac, I always use a virtual linux machine for the server -- just a whole lot easier to keep the prod and test platforms in sync, and makes it easier to roll back.
I do like having macports (or homebrew, I guess) on the mac for tools like mutt, curl, wget, nmap, etc., but I'd prefer to run a whole virtual front end server talking to a virtual db server and use local clients on the mac to connect.
(I really wish I had more than 4GB RAM in my Air, though, but don't want to replace this one so soon)
I found this alarming: " The majority of active apps on Heroku use Postres, but we found that many developers use SQLite or MySQL on their local development machines".
If your app is at the deployment to production stage, then I would strongly recommend using the same database as will be used in production. This quote isn't actually saying what proportion of developers don't do that, though.
It definitely took some work to get PostgreSQL up and running on OSX when I was trying to mirror my Heroku production environment locally for dev. This lowers a bunch of barriers, especially for a newbie to the PostgreSQL like me so I can appreciate this.
I'm sure anyone working through Michael Hartl's Rails Tutorial right now and trying to do the optional Postgres configuration is also pretty excited at the time savings.
He might be confused like me. I've been using it for weeks now and didn't realize it hadn't been officially released yet. I found it while searching and it has proven very convenient for working with Heroku.
http://postgresapp.com/ https://github.com/mattt/PostgresApp
Postgres.app is the easiest way to get started with PostgreSQL on the Mac. Open the app, and you have a PostgreSQL server ready and awaiting new connections. Close the app, and the server shuts down.
Postgres.app will be distributed through the Mac App Store, with a separate build containing the latest PostgreSQL beta available for direct download from the website.