The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/10/static/pgupgrade.html Description:
The postgresql service (since 9.x?) runs under Windows with the integrated NetworkService account and not with a dedicated postgres account anymore (at least by using the EnterpriseDB installer). You can't start a shell as NetworkService (which seems not to be necessary). But the owner and permissions of the data directory should be checked and changed afterwards if necessary. Another problem (not directly of pg_upgrade) is, that pg_upgrade internally uses xcopy.exe to copy the pg_clog/pg_xact directory. Now, if somebody redirects the standard output of pg_upgrade.exe but NOT the standard input, xcopy failes silently and the pg_xact directory (or files within) are missing. This is a problem of xcopy.exe, apparently fixed on newer versions of Windows but existent under Windows 7 x64. After many hours of testing and searching, I finally found the cause of the failure here: http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/ab3c0cc7-83c2-4a86-9188-40588b7d1a52/ I can confirm, that redirecting also the standard input of pg_upgrade.exe solves the problem.