In 2012 I posted a question on Stackoverflow that has since had over 180,000 views. When postgres stops running it has always felt like vodoo arts to get it back online and to this day has felt like mindless googling until the issue hopefully resolved.
This guide aims to pull together all the common issues in one place and create a definitive guide and workflow to getting postgres up and running on your Mac.
Some conflicts arise from the Mac getting confused over which version of Postgres to use.
Replacement package managers, such as Homebrew do many things great to fill the missing package manager void, unfortunatley installing a database is administrativley intrusive on your Mac and is a little beyond the abilities of the package manager to fully get right. Your package manager is using hacks to get Postgres installed and often it just doesn't work out right. TLDR; MacOS needs a native package manager. Until then seek more reliable approaches.
PostgresApp has been created as a Mac App to address correctly installing postgres in a clean way beyond the scope of what Homebrew can do. TLDR; The most reliable way forward for non Postgres experts is to remove any Postgres versions you have installed and use Postgres App. Often this will be simple, but there are also traps here (which we will discuss below).
- Use Postgress App to install and run Postgres
- If you have any non system versions of Postgres Installed, remove them first.
- If you run into common issues, this guide will show you how to address them.
Finally we're also open to new insights and ideas that will hopefully come from getting this guide out there.