Kyng Chaos
“The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects.”
- the wisdom of Tarzan


Mac OS X installers for PostgreSQL, and GIS extensions PostGIS and pgRouting. Built for Mt Lion+, 64bit only.

NOTE: I do not support any other Postgres distribution in my extensions. Please do not try to install PostGIS in another Postgres and then ask why it won't install.

Postgres 9.4

Extensions require full Postgres 9.4 above

PostgreSQL itself does not require anything extra, and includes the Pl/Python language (uses the system Python). Initial database setup is done for you if you have never installed Postgres before.

The PostgreSQL Client does not include the server. This is handy if you just need to connect to another computer that is running a Postgres server. Also included are the client libraries and headers, so developers don't have to install the full Postgres to add Postgres support to their software. The full Postgres package includes Postgres Client, so there is no need to install the client if you already installed the server.

The PostGIS extension requires the GDAL Complete 1.11 framework package. The pgRouting extension does not require anything extra, though it can use PostGIS. All extensions require the Postgres server and won't function with the client-only package.


If you want to update many parts at once, ie Postgres, PostGIS and the system, here is a recommended order of updates:

  1. PostGIS to latest (see update notes in readme)
  2. Dump (see the Postgres Upgrade readme)
  3. System to latest (ie Snow Leopard)
  4. Postgres to latest
  5. Restore (see the Postgres Upgrade readme)

Yosemite Upgrade

If you upgrade your Mac to Yosemite (possibly also Mavericks), Apple's upgrade process kills your Postgres data folder – the data is present, but some folders are missing, so Postgres won't start, and won't give any errors as to why or that it even failed to start.

If Postgres is not starting after upgrading to Yosemite, open a Terminal and run the following commands:

sudo launchctl unload /Library/LaunchDaemons/org.postgresql.postgres.plist
sudo cd /usr/local/pgsql/data

Make sure you are in the /usr/local/pgsql/data folder before continuing. pwd will tell you where you are.

sudo mkdir -p {pg_tblspc,pg_twophase,pg_stat,pg_stat_tmp,pg_replslot,pg_snapshots,pg_logical}
sudo mkdir -p pg_logical/{snapshots,mappings}
sudo chown -R _postgres *
sudo launchctl load /Library/LaunchDaemons/org.postgresql.postgres.plist


NOTE: I've had reports of the 9.1 installer not initializing the data cluster, which results in Postgres not starting. It seems to be random, and I haven't figured out the cause yet. If Postgres won't start (you get an error "could not connect to server: No such file or directory" when trying to connect with psql), try manually initializing the cluster with:

/usr/local/pgsql-9.1/bin/initdb -U postgres \
-D /usr/local/pgsql-9.1/data --encoding=UTF8 --locale=en_US"

Or see the Locales and Encodings readme if you need a different locale or encoding.

Then stop and start Postgres as specified in the readme.

Older Systems

For Postgres and extras to run on older systems, see the build notes:

software/postgres.txt · Last modified: 2018/02/06 17:19 by kyngchaos
Copyright © 2004-2016 William Kyngesburye Driven by DokuWiki Recent changes RSS feed Valid XHTML 1.0