←back to thread

264 points davidgomes | 3 comments | | HN request time: 0s | source
Show context
vivzkestrel ◴[] No.41876746[source]
i ll tell you why from my end. I installed Postgres14 via homebrew many years ago on my Apple M1 mac mini. I searched a lot on how to "upgrade" this installation but found nothing. I have a few databases running with data on it which I can't afford to lose if something goes down for more than 1 hour. I wish someone would guide me on how to actually install a newer postgres such as v17 without breaking an existing v14 install or losing data since I am not an expert by any means
replies(3): >>41876775 #>>41876779 #>>41877506 #
1. sofixa ◴[] No.41876775[source]
And this, kids, is a good example of why homebrew is not a real package manager, and why macOS is not the best at running production services.

I hope you have a backup somewhere else, not on the Mac Mini. One option would be to restore it on another machine on Postgres 14, follow the upgrade path to 17 (idk if you can jump directly but a few Google searches will cover this), verify the data, back up the new db, somehow upgrade Posgtres on your Mac, and restore the new back up. Done.

replies(1): >>41878585 #
2. mxey ◴[] No.41878585[source]
I don’t see how this is homebrew‘s fault? Homebrew lets you install multiple versions of PostgreSQL at once, which you need for pg_upgrade, just like you can do with APT

brew install postgresql@17

replies(1): >>41879539 #
3. ◴[] No.41879539[source]