'mix ecto.create' errors with: role "postgres" does not exist

I just stumbled on this issue after returning to Elixir/Phoenix and reinstalling everything from scratch. The solution was to change the database config username in dev.exs from postgres to my macOS username.