How to Upgrade PostgreSQL from 9.x to 10 on Debian?

Published: 14 October 2017
on channel: Mustafa Akdemir
7,735
27

This video will show how to upgrade PostgreSQL Database Server
from PostgreSQL 9.6 to PostgreSQL 10 on Debian.

Here is the commands:

$ su -

dpkg-query -l postgresql*

// Run pg_lsclusters, your 9.6 and 10 main clusters should
// be "online".
pg_lsclusters

// Stop the 10 cluster and drop it.
pg_dropcluster 10 main --stop

// Upgrade the 9.6 cluster to the latest version.
pg_upgradecluster 9.6 main

// Your 9.6 cluster should now be "down".
pg_lsclusters

// Check that the upgraded cluster works,
// then remove the 9.6 cluster.
psql -U postgres

pg_dropcluster 9.6 main

// After all you may totally remove version 9.6 from the server
apt --purge remove postgresql-client-9.6 postgresql-9.6

dpkg-query -l postgresql*


Watch video How to Upgrade PostgreSQL from 9.x to 10 on Debian? online without registration, duration hours minute second in high quality. This video was added by user Mustafa Akdemir 14 October 2017, don't forget to share it with your friends and acquaintances, it has been viewed on our site 7,735 once and liked it 27 people.