Fix pg_upgrade file share violation on Windows created by the commit

Bruce Momjian <bruce@momjian.us>

Commit: 7d947ec82ac8a7d6a6ce8acf08067dd69098d6cd
Author: Bruce Momjian <bruce@momjian.us>
Date: 2012-08-07T17:10:44Z
Releases: 9.2.0
Fix pg_upgrade file share violation on Windows created by the commit
4741e9afb93f0d769655b2d18c2b73b86f281010.  This was done by adding an
optional second log file parameter to exec_prog(), and closing and
reopening the log file between system() calls.

Backpatch to 9.2.

Files