The easiest way to get started with PostgreSQL on the Mac

Included Packages

Each release of comes with the latest stable release of PostgreSQL, as well a few choice extensions. Here’s a rundown of what’s under the hood:

Connection Parameters

  • Host: localhost
  • Port: 5432 (default)
  • User: your user name
  • Password: blank
  • Database: same as user name

Allowing Remote Connections

By default, PostgreSQL only allows connections from localhost, and requires no password.

If you want to connect to PostgreSQL from a different computer, you need to change the listen_address parameter in the file postgresql.conf, which you can find in your data directory (See Connections and Authentication in the PostgreSQL documentation).

Additionally, you need to edit the pg_hba.conf file to configure which hosts can access the database.

Restart after changing these files.

Useful Directories

  • Default data directory: ~/Library/Application\ Support/Postgres/var-9.6
  • Binaries: /Applications/
  • Headers: /Applications/
  • Libraries: /Applications/
  • Man pages: /Applications/
  • Config: ~/Library/Application\ Support/Postgres/var-9.6/postgresql.conf