Postgres.app

Installing and using PostgreSQL manually using Homebrew is a pain, especially when migrating from Intel to Apple Silicon, as I had to do. Postgres.app is an easy way to solve this problem. It lives in your menu bar and comes out only when you need it. You don’t need to touch the CLI, but it includes a set of commands that allow for powerful Postgres usage. You can even run multiple server versions at the same time.

The Problem with Homebrew

Homebrew is a great package manager, but it can be really annoying. It always auto-upgrades all of your packages when installing anything, which is a huge downside for databases. Sometimes you need to match the deployed version, or it just takes too long to update datastores.

Saved by Postgres.app

Postgres.app is well described on its website as “The easiest way to get started with PostgreSQL on the Mac”. You just have to download the disk image, move to Applications, and open the app.

It comes with a built-in PostGIS extension and 6.6k stars on GitHub.

You can use the CLI tools by running these commands once:

sudo mkdir -p /etc/paths.d &&
echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp

Now, you can use commands like psql or createdb in your shell. It also connects with the GUI Postgres client of your choice, like Postico and pgAdmin.

You can get it here: https://postgresapp.com/

/


Leave a Reply

Your email address will not be published. Required fields are marked *