I want to upgrade version 9.3 to 9.5 but after some steps I find that I upgraded to version 10, but I'm looking to go from 9.3 to 9.5.

When I type the pg_lsclusters command I find myself with three:

enter image description here

I used sudo pg_dropcluster 9.5 main --stop and sudo pg_dropcluster 10 main --stop to stop both, and sudo pg_upgradecluster 9.3 main command to set the 9.3 cluster to the latest version.

But I want to go to 9.5 instead of 10. The result after what I'm typing is:

enter image description here


Once you drop cluster for version 9.5, you may upgrade your 9.3 to 9.5 with this command:

sudo pg_upgradecluster -v 9.5 9.3 main

If you omit -v 9.5 it will upgrade the cluster to the latest postgresql version you have installed. For more information, type man pg_upgradecluster.

Now, since you already upgraded to 10, you have to stop the new cluster (version 10) and start the 9.3 again. You may do this with commands:

sudo pg_ctlcluster 10 main stop
sudo pg_ctlcluster 9.3 main start

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.