Last brew upgrade have been update PostgreSQL from 10.6 to 11.1 and didn't add new Postgresql@10 formulae. As result i can't upgrade DB to 11 and can't roll back to 10.6:
~ 禄 brew postgresql-upgrade-database
Error: No postgresql 10.* version installed!
When i've try to start it without DB upgrade i've get in log:
2018-12-07 14:32:02.317 +05 [78268] FATAL: database files are incompatible with server
2018-12-07 14:32:02.317 +05 [78268] DETAIL: The data directory was initialized by PostgreSQL version 10, which is not compatible with this version 11.1.
Just upgraded 10.6 -> 11.1 and stuck with same issue.
Until the issue is fixed:
brew unlink postgresql
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/cec7d3b30e80abbd4a7e52dfa17d726e67e555df/Formula/postgresql.rb
@giannisp thanks, but how to install postgis now, to skip postgres annoying migration process? :) (which, btw, fails if using brew tool #34879, #34878)
postgis always want newest postgres version (tried to install using same commit, even the commit with 2.3* postgist version added too, didn't help)
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/cec7d3b30e80abbd4a7e52dfa17d726e67e555df/Formula/postgis.rb
Any help will be very appreciated! :)
@vanburg true, I had the same issue with postgis for a postgis-enabled database. Workaround didn't work there. Check with pg_dump/pg_dumpall, if you can migrate the db via a manual export from 10.6, and then manual import on 11.1.
Requests for formula are only accepted in the form of pull requests. The easiest way is just to submit the last 10.x formula as postgresql@10
Most helpful comment
Until the issue is fixed: