1

I did brew update and brew upgrade

Now my PostgreSQL is 10.1 On the server I have 9.6 and I want it to be the same.

I can connect and read my data now still (as I assume the brew service didn't restart, but I didn't run pgupgrade or anything yet)

Also found packages as

brew search postgres

I have

$ brew search postgres
==> Searching local taps...
postgresql ✔     check_postgres   postgres-xc      postgresql@9.4   postgresql@9.5   postgresql@9.6   postgrest

What is the best and safest way to downgrade the package, save my current database and make postgresql@9.6 run? As I would like a version identical with the server we are working on (9.6), and I would like to make sure pg_upgrade never made it "PostgreSQL 10".

Is there any safe way to downgrade? I could do it on Linux from a description but the Mac+homebrew postgres user management works differently (for example doesn't use a postgres Unix user)

1

Had the same problem and found this from https://jaketrent.com/post/downgrade-previously-installed-brew-formula/

  1. brew install postgres@9.6
  2. brew switch postgres 9.6.3
  3. brew info postgres // prints summary that should show no conflicts
  4. brew services start postgresql // if desired, of course.
  • @nimesh-neema, your edit was a rewrite of my comment, not formatting. While it was perhaps well-meaning, it was no longer my words. If you want to answer, please submit an answer. If you want to request clarification or make edits because I used colloquial grammar, please say so in your edit comments. – ggranum Apr 30 '18 at 8:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .