Upgrading PostgreSQL 9.2 to 9.3 with Homebrew. What to do when PostgreSQL fails to start after a brew upgrade. Published September 23, 2013 Revised December 27, 2014: These instructions have also been tested for 9.3→9.4! Brew services start postgresql See how easy brew services makes it? Postgresql now starts alongside your mac! Now let’s create a database that we want to be used by our project. To create a new. Run the following to start the server and login to it (it basically sets up a single 'admin' user with your username, so that's who you'll be logged in as. $ brew services start postgresql $ psql postgres You can see what other versions are available by running $ brew search postgres. $ brew services start postgresql@10 Successfully started `postgresql@10` (label: homebrew.mxcl.postgresql@10) however, no postgresql server is running, but the plist file was copied to /Library/LaunchAgents $ pwd && ls homebrew. /Users/ckhall/Library/LaunchAgents homebrew.mxcl.postgresql@10.plist What you expected to happen.
To have launchd start postgresql now and restart at login: brew services start postgresql Or, if you don't want/need a background service you can just run: pgctl -D /usr/local/var/postgres start thank you commenters (sorry I didnt notice you all before but thankful for not getting notifications 🤭) Installing Postgres via Brew Pre-Reqs.
Geoffroy Baumier3 min read
After upgrading a few programs including postgres when starting a new project, I ran into an issue. I already had some postgres databases from older projects and I couldn't start postgres (and create my new database).
To install postgres with brew I used:
To see if postgres is running I can type:
Then the funny thing was when I tried to start the service:
Great! So it's running! But no..
Macos Restart Postgres
To see what is the issue, let's look at the logs:
And there was the issue.
All I had to do to fix this was to run this command:
Brew Start Postgresql
Then let's start it postgres:
Now I can see that I have two postgres services with the two different versions. I can create my new updated database. Also the good thing is that I didn't lose any data from previous project and I can run the service with version 12 if I ever need it.