Posts

Showing posts from January, 2017

Upgrade Postgres 9.4 to 9.6 in MAC.

Postgres 9.6.1 is the current Postgres version, if you want to upgrade the Postgres version in mac it very easy now using homebrew. Just follow the below steps Step 1: Turn PostgreSQL off first:     $ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist     # or, if you're running a current version of Homebrew     $ brew services stop postgresql Step 2: Update brew and upgrade Postgres     $ brew update && brew upgrade postgresql Step 3: Initialize the new empty database     $ initdb /usr/local/var/postgres9.6.1 -E utf8 Step 4: When we update check the currently available version of the system     $ ls /usr/local/Cellar/postgresql/ Which gives you output something like this: 9.4, 9.5.0, 9.6.1 If you have more than two, that’s ok, just get the most recent one (9.6.1) and the last before 9.5.0. Remember that version for the next step. Step 5: Upgrade the version $ pg_upgrade \   -d /usr/local/var/postgres \   -D /usr/local/var/postgre