Installing PostgreSQL on macOS

PostgreSQL can be installed in a variety of ways on macOS. The recommended way is to install Postgres.app.[36]

You may prefer to install PostgreSQL 16 via Homebrew, which is another popular method. If you’re comfortable with your Homebrew PostgreSQL 16 installation, review the following note and skip the remainder of this section.

PostgreSQL Homebrew Installation

images/aside-icons/warning.png

If you installed PostgreSQL via Homebrew, you may be missing configuration compared to how PostgreSQL is installed when using the recommended method of Postgres.app. For example, you’ll need a PostgreSQL user called postgres with a password. If you don’t ...

Get High Performance PostgreSQL for Rails now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.