Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

upgrade PostgreSQL from version 9.5 to version 9.6 without losing data Ubuntu

First we have to stop postgresql
sudo /etc/init.d/postgresql stop
Create a new file called /etc/apt/sources.list.d/pgdg.list and add below line
deb http://apt.postgresql.org/pub/repos/apt/ utopic-pgdg main
Follow below commands
wget -q -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.4
sudo pg_dropcluster --stop 9.4 main 
sudo /etc/init.d/postgresql start
Now we have everything, just need to upgrade it as below
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
That's it. Mostly upgraded cluster will run on port number 5433. Check it with below command
sudo pg_lsclusters


Popular posts from this blog

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

7 Steps to configure BDR replication in postgresql

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

Ora2PG - Oracle/MySQL to Postgres DB migration Version 20.0

PostgreSQL Introduction