User Tools

Site Tools


mac:postgres

Table of Contents

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

brew install postgresql

Startup

To have launchd start Postgres at login:

ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents

Then to load postgresql now:

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

Or, if you don't want/need launchctl, you can just manually run:

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
mac/postgres.txt · Last modified: 2013/10/29 00:20 by Craig Buchek