The attached, applied patch changes pg_upgrade: now that it uses -w in
pg_ctl, remove loop that retried testing the connection; also
restructure the libpq connection code.
This patch also removes the unused variable postmasterPID and fixes a
libpq PQconn structure leak that was in the testing loop.
Yeah, I got a fix into that patch. ;-)