Thanks Keith for your prompt reply.
But on trying to execute the below command
sudo -H -u postgres /usr/lib/postgresql/10/bin/pg_upgrade \
-b /usr/lib/postgresql/9.5/bin \
-B /usr/lib/postgresql/10/bin \
-d /var/lib/postgresql/data/postgresql0 \
-D /var/lib/postgresql/10/data/postgresql0 \
-o ' -c config_file=/etc/postgresql/9.5/main/postgresql.conf' \
-O ' -c config_file=/etc/postgresql/10/main/postgresql.conf' --check
It is failing with the below error in pg_upgrade_server.log
command: "/usr/lib/postgresql/9.5/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/postgresql/data/postgresql0" -o "-p 50432 -b -c config_file=/etc/postgresql/9.5/main/postgresql.conf -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/tmp'" start >> "pg_upgrade_server.log" 2>&1
waiting for server to start....2017-11-14 15:27:31 UTC [16239-1] LOG: database system was shut down at 2017-11-14 15:16:43 UTC
2017-11-14 15:27:31 UTC [16239-2] LOG: MultiXact member wraparound protections are now enabled
2017-11-14 15:27:31 UTC [16238-1] LOG: database system is ready to accept connections
........................................................... stopped waiting
pg_ctl: could not start server
I have attached the entire installation log.
Can you let me know what I am doing wrong? Looks like some issue with the port conflict. I have not modified any configuration during the installation 9.5 is running on 5432 and 10 on 5433 as per postgresql.conf.