brew services stop postgresql@14
brew install postgresql@15
brew services stop postgresql@15
- optionally add --check argument to test upgradability between versions
/opt/homebrew/var/postgresql@14
is where old data lives. If you can't determine the data dir, fire up old postgres again and runSHOW data_directory;
./opt/homebrew/var/postgresql@15
is where new data lives- see pg_upgrade docs for more info
/opt/homebrew/Cellar/postgresql@15/15.1/bin/pg_upgrade -d /opt/homebrew/var/postgresql@14 -b /opt/homebrew/Cellar/postgresql@14/14.6/bin -D /opt/homebrew/var/postgresql@15
brew unlink postgresql@14
brew link postgresql@15
brew services start postgresql@15