Shahen Hovhannisyan
Shahen Hovhannisyan

Reputation: 645

PostgreSQL: Upgrade Postgres Server

How can I upgrade my PostgreSQL server? I've installed the latest client version with homebrew.

$ psql (9.6.1, server 9.5.4) My server is in 9.5.4 version.

How can I upgrade it to 9.6 ?

OS: MacOS

Upvotes: 1

Views: 511

Answers (1)

Shahen Hovhannisyan
Shahen Hovhannisyan

Reputation: 645

I found answer to my question.

For the first we should uninstall posrgresql

$ brew uninstall postgresql

Then we should remove db files

$ rm -rf /usr/local/var/postgres

After that we should remove Cellar data

$ rm -rf /usr/local/Cellar/postgresql

And after removing all files we can start to install new version

$ brew install postgresql

If service will not run automatically we can start it just typing the following

$ brew services start postgresql

That's all !

Upvotes: 1

Related Questions