I’m trying to understand the correct workflow for installing and managing older versions. For example, I need to upgrade to a newer version of PostgreSQL, but not the latest version. The last time I did
brew install postgresql, the latest version was 9.5.3. However, now if I do
brew upgrade postgresql, the latest version would be 10.1, so that approach is not going to work. Reviewing the history of the postgresql formula, I see that the latest 9.5.x version was 9.5.5 before it jumped to 9.6.1. Ideally, I’d like to install 9.5.9.
I see that there is a firstname.lastname@example.org formula. The latest version supported by this formula is 9.5.10. I’ve read all the documentation that I could find regarding these @version formula, but it’s still not clear to me how to use them correctly. When I install via
brew install email@example.com I see that it is keg-only, and the paths include the @9.5 in them. If I try to do
brew switch postgresql 9.5.10, it says that I don’t have that version available (under the postgresql formula name).
I don’t really need or want to support multiple versions of PostgreSQL. I have an existing database that I want to use and want to continue to connect to it via the default port. I just want to “pin” my default version of PostgreSQL to 9.5.9, or alternatively at the latest version within the 9.5.x branch.
Is there a way to do this? What is the correct way to work with these @version formulae?