I'm attempting to upgrade a Postgres instance from version 12 to version 13, following the steps outlined at https://www.postgresql.org/docs/13/pgupgrade.html.
From an elevated command prompt, I'm running (under Windows 10):
SET PATH=%PATH%;C:\Program Files\PostgreSQL\13\bin;
pg_upgrade.exe --old-datadir "E:\Programs\PostgreSQL\12\data" --new-datadir "E:\Programs\PostgreSQL\13\data" --old-bindir "C:\Program Files\PostgreSQL\12\bin" --new-bindir "C:\Program Files\PostgreSQL\13\bin" --old-port=5431 --new-port=5432 --jobs=5
The directories appear to be all correct, however the command returns:
Performing Consistency Checks ----------------------------- Checking cluster versions ok *failure* Consult the last few lines of "pg_upgrade_server_start.log" or "pg_upgrade_server.log" for the probable cause of the failure. connection to database failed: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5431? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5431? could not connect to source postmaster started with the command: "C:/Program Files/PostgreSQL/12/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "E:/Programs/PostgreSQL/12/data" -o "-p 5431 -b " start Failure, exiting
pg_upgrade_server_start.log
says:
command: "C:/Program Files/PostgreSQL/12/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "E:/Programs/PostgreSQL/12/data" -o "-p 5431 -b " start >> "pg_upgrade_server_start.log" 2>&1
The program "postgres" was found by "C:/Program Files/PostgreSQL/12/bin/pg_ctl"
but was not the same version as pg_ctl.
Check your installation.
I'm at a loss; what might be wrong, and how can I successfully perform this procedure?