I had a ubuntu machine on which postgresql 9.5 is running with approximately 12 GB of data. Now i want to upgrade my postgresql version from 9.5 to 10. I googled some articals but unable to upgrade and one more thing i do not want to completely uninstall postgres 9.5 and install postgres 10. My postgresql 9.5 settings are:
1-Postgresql config files are at:
/opt/PostgreSQL/9.5/
2- Postgresql 10 installed location
/etc/postgresql/10
The normal process to upgrade on Debian or Ubuntu is this one :
Stop the new updated version of PostreSQL :
service postgresql stop
Drop the new updated version cluster to be sure nothing is inside :
pg_dropcluster --stop 10 main
Then data migration :
pg_upgradecluster -m upgrade 9.5 main
Then stop previous version of PotsgreSQL :
pg_dropcluster 9.5 main --stop
Remove the old version :
apt-get autoremove --purge postgresql-9.5
Then just restart PostgreSQL, the new version with database migrated :
service postgresql start
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With