diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c
new file mode 100644
index fbccc2e..cc81fa0
*** a/src/bin/pg_upgrade/pg_upgrade.c
--- b/src/bin/pg_upgrade/pg_upgrade.c
*************** copy_clog_xlog_xid(void)
*** 473,480 ****
  	/* now reset the wal archives in the new cluster */
  	prep_status("Resetting WAL archives");
  	exec_prog(UTILITY_LOG_FILE, NULL, true,
! 			  "\"%s/pg_resetxlog\" -l %s \"%s\"", new_cluster.bindir,
! 			  old_cluster.controldata.nextxlogfile,
  			  new_cluster.pgdata);
  	check_ok();
  }
--- 473,481 ----
  	/* now reset the wal archives in the new cluster */
  	prep_status("Resetting WAL archives");
  	exec_prog(UTILITY_LOG_FILE, NULL, true,
! 			  /* use timeline 1 to match controldata and no WAL history file */
! 			  "\"%s/pg_resetxlog\" -l 00000001%s \"%s\"", new_cluster.bindir,
! 			  old_cluster.controldata.nextxlogfile + 8,
  			  new_cluster.pgdata);
  	check_ok();
  }
