User Tools

Site Tools


mac:postgres

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mac:postgres [2013/10/29 00:20] (current)
Craig Buchek Created to document Homebrew installation of PostgreSQL.
Line 1: Line 1:
 +====== PostgreSQL ======
 +
 +PostgreSQL is our preferred database for most situations. It's very reliable and feature-rich. Some of its key features:
 +
 +  * ACID compliant since its inception
 +  * ANSI SQL
 +  * Full text search
 +  * JSON and key-value stores
 +  * GIS extensions
 +
 +Mac OS X 10.8 (Mountain Lion) came with PostgreSQL 9.1.4; be sure $PATH has /​usr/​local/​bin before /usr/bin, or else you'll get the wrong version. Mac OS X 10.9 (Mavericks) does not come with PostgreSQL.
 +
 +
 +===== Installation =====
 +
 +<code bash>
 +brew install postgresql
 +</​code>​
 +
 +
 +===== Startup =====
 +
 +To have launchd start Postgres at login:
 +
 +<code bash>
 +ln -sfv /​usr/​local/​opt/​postgresql/​*.plist ~/​Library/​LaunchAgents
 +</​code>​
 +
 +Then to load postgresql now:
 +
 +<code bash>
 +launchctl load ~/​Library/​LaunchAgents/​homebrew.mxcl.postgresql.plist
 +</​code>​
 +
 +Or, if you don't want/need launchctl, you can just manually run:
 +
 +<code bash>
 +pg_ctl -D /​usr/​local/​var/​postgres -l /​usr/​local/​var/​postgres/​server.log start
 +</​code>​
 +
  
mac/postgres.txt ยท Last modified: 2013/10/29 00:20 by Craig Buchek