Hello Akshay, Try starting both servers individually. If you can then,it may be port conflict
Below is the part of document- Obviously, no one should be accessing the clusters during the upgrade. pg_upgrade defaults to running servers on port 50432 to avoid unintended client connections. You can use the same port number for both clusters when doing an upgrade because the old and new clusters will not be running at the same time. *However, when checking an old running server, the old and new port numbers must be different. * Thanks Rajni On Thu, Apr 19, 2018 at 12:02 AM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 04/18/2018 05:02 AM, Akshay Ballarpure wrote: > >> Hi Fabio, >> sorry to bother you again, its still failing with stopping both server >> (8.4 and 9.4) >> > > Actually according to the command show at bottom of post it is failing > trying to start the 8.4 server. In your previous post that was because it > was already running: > > -bash-4.2$ ps -eaf | grep postgres > postgres 9778 1 0 09:17 ? 00:00:00 /usr/bin/postgres -p 50432 > -D /var/ericsson/esm-data/postgresql-data/ > > FATAL: lock file "postmaster.pid" already exists > HINT: Is another postmaster (PID 9778) running in data directory > "/var/ericsson/esm-data/postgresql-data"? > pg_ctl: could not start server > > > Make sure both servers are stopped before running pg_upgrade. Per a > previous suggestion follow the check list here: > > https://www.postgresql.org/docs/10/static/pgupgrade.html > " > Usage > > These are the steps to perform an upgrade with pg_upgrade: > > ... > > > " > > >> -bash-4.2$ /opt/rh/rh-postgresql94/root/usr/bin/pg_upgrade >> --old-bindir=/usr/bin --new-bindir=/opt/rh/rh-postgresql94/root/usr/bin >> --old-datadir=$OLDCLUSTER --new-datadir=$NEWCLUSTER >> >> connection to database failed: could not connect to server: No such file >> or directory >> Is the server running locally and accepting >> connections on Unix domain socket "/var/run/postgresql/.s.PGSQL. >> 50432"? >> >> >> could not connect to old postmaster started with the command: >> "/usr/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D >> "/var/ericsson/esm-data/postgresql-data" -o "-p 50432 -c autovacuum=off >> -c autovacuum_freeze_max_age=2000000000 -c listen_addresses='' -c >> unix_socket_permissions=0700" start >> Failure, exiting >> >> >> With Best Regards >> Akshay >> > > > > -- > Adrian Klaver > adrian.kla...@aklaver.com > > -- Thank you Sincere Regards Rajni 0410 472 086