Upgrade Postgresql 9.4 - 9.6

postgresql

#1

Hi, at one time I recall there being multiple version of Postgres on the Cloud9 instances. If that’s the case, how does one switch versions on an instance? If that’s not the case, will the standard upgrade path for Postgres work? Thanks


#2

@scorintha I am looking to do the same, have you resolved this?

EDIT: (Here is a solution that worked for me)

First I uninstalled postgres completely:
$ sudo service postgresql stop sudo apt-get --purge remove postgresql\*

then Create the file /etc/apt/sources.list.d/pgdg.list:
$ touch /etc/apt/sources.list.d/pgdg.list
and add a line in that file for the repository:
deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main
I added this line by running:
$ sudo vim /etc/apt/sources.list.d/pgdg.list
and then pasting it in from vim
(Note: this command failed for me, but skipping it didn’t break anything)

then Import the repository signing key, and update the package lists:

$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ sudo apt-key add -
$ sudo apt-get update

then run:
$ sudo apt-get install postgresql-9.6

Finally, I had to recreate my DB and USERS etc

See postgres docs for more info (be sure and set the ubuntu version to 14.04 - cloud9’s default)


#3

I hadn’t made any progress, but I will try this this weekend. Thanks much for the info.