Not really sure what caused this but most likely exiting the terminal while my rails server which was connected to PostgreSQL database was closed (not a good practice I know but lesson learned!)
I've already tried the following:
brew services restart postgresql
cd Library/Application\ Support/Postgres
terminal tells me Postgres folder doesn't exist, so I'm kind of lost already. Although I have a feeling that deleting postmaster.pid would really fix my issue. Any help would be appreciated!Below was the workaround if you prefer to stay in v13.3, if you are on 14.2 you can simply change the port postgresql is listening to. Read their docs about it here.
Note that this solution works for the setup that I have (take a look at the original post for my setup details ie. OS & how what I'd use to install Postgres)
vscode
sudo code . /usr/local/var/postgres/postgresql.conf
vim
sudo vi /usr/local/var/postgres/postgresql.conf
v13.3 solution
it appears that the upgrade really messed up my postgres since per Nagev's answer it's listening to port 5433 instead of 5432. I downgraded to v13.3 to fix this issue.
brew uninstall postgresql
brew install postgresql@13
brew services start postgresql@13
brew link postgresql@13 --force