When trying to start postgresql
➜ ~ brew services start postgresql
Warning: Use postgresql@14 instead of deprecated postgresql
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/josh/Library/LaunchAgents/[email protected]` exited with 5.
Getting "error" as status when running brew services list
➜ ~ brew services list
Name Status User File
postgresql@14 error 256 root ~/Library/LaunchAgents/[email protected]
PSQL was working perfectly fine, shut down my laptop (did not update) and when I turned it on the next day psql was not working. I am on OSX Version 12.6 (Monteray).
4
Answers
Had the same error today 🤓 on my Mac Ventura 13.0. Did these steps and it helped.
rm /usr/local/var/postgresql@{YOUR_VERSION}/postmaster.pid
to removepostmaster.pid
file. this is usually caused by an error in thepostmaster.pid
file.brew services stop postgresql
to stop the current postgresql service.brew services start postgresql
, a newpostmaster.pid
file will be generated.If this doesn’t work you can run
brew doctor
and see if it will returnYour system is ready to brew
. If there are warnings 🥶, you can share them here with the community for more details.?I had the same issue on 13.0 on M1 pro, all is did was
brew services restart postgresql@14
, it shut down, restarted and ran fine, issue gone.Had the same issue, but couldn’t get Postgres 14 working, and ended up just upgrading to Postgres 15, which I did get to work.
The steps looked like this (version numbers might vary)
In my case, I had postgresql@13 and postgresql@14 install with brew on Ventura 13.1
I first removed postgresql@13 and all data within :
brew remove postgresql@13
andrm -rf /usr/local/var/postgresql@13
This assure me that the previous folder is fully remove, however, I did not care about my local data … you may want to take care of it before doing this
After that, I reinstall postgresql@14 within the following commands :