Upgrading postgres to 10 from 9.5 using pg_upgradecluster I am testing the process of upgrading postgres to 10 from 9.5

I am following the steps as mentioned in this link -

dmanna@ubuntu:~$ pg_lsclusters 
Ver Cluster Port Status Owner    Data directory               Log file
9.5 main    5432 online postgres /var/lib/postgresql/9.5/main /var/log/postgresql/postgresql-9.5-main.log
10  main    5433 online postgres /var/lib/postgresql/10/main  /var/log/postgresql/postgresql-10-main.log

sudo pg_dropcluster 10 main --stop
sudo pg_upgradecluster 9.5 main -m upgrade
sudo pg_dropcluster 9.5 main


Can someonet let me know the following


If there is a way I can check if the upgrade will be successful
before going for the actual upgrade? 
If I am using the link option
in the upgrade can I still use the sudo pg_dropcluster 9.5 main?
To check for compatibility, etc use the native upgrade command with check option. 


pg_upgrade —check
Refer to the the pg_upgrade doc for details. And remember (just found out for Ubuntu today), datadir is actually the location of the dir which has the config files (hba, ident, pg.conf).


If the —link option is used

sudo pg_dropcluster 9.5 main


should be run. IIRC pg_upgradecluster starts the db cluster automatically.

If you follow pg_upgrade route, there is defined point where the old cluster can still be used/ rolled back to.