PHOENIX -- When the roof is open at Chase Field, the ball tends to fly out.
That's what happened Friday night.
Pirates manager Clint Hurdle knows all about the ballpark and what happens in the dry desert air because he made regular trips there in eight seasons as manager of the Colorado Rockies.
"You open that roof, hot like this, I've seen a bunch of ball games here for a lot of years," Hurdle said. "Some crazy things can happen."
All three home runs came off Patrick Corbin (1-2), who allowed five runs in six innings.
"A couple of mistakes early," Corbin said, "and in this ballpark if you make mistakes early they are going to go a long way. `'
"It was a tough night to pitch," Arizona manager Chip Hale said. "Obviously the ball was really carrying with the roof open. There were some balls that were hit pretty hard. `'
Jonathon Niese (3-0) got the win despite surrendering four runs and 10 hits in 5 1/3 innings.
Mark Melancon allowed three straight singles with two outs in the eighth but pitched a perfect ninth for his fourth save.
The Diamondbacks rallied with three runs in the eighth, the last on Jean Segura's face-first slide into first base for an RBI infield single to cut Pittsburgh's lead to 8-7. Arizona threatened more when Paul Goldschmidt beat out a grounder to the shortstop Mercer, a call reversed on review after he initially was ruled safe, to load the bases, but Yasmany Tomas bounced out to third to end the inning.
The Diamondbacks, back from a 7-3 road trip, fell to 2-6 at home.
Mercer said he could feel the difference when the roof opened just before the game began.
"You could feel the wind whipping in there," he said. "You could feel it out there definitely on the field that the ball was flying."
Rodriguez and Polanco hit consecutive home runs in the second inning
Rodriguez's two-run shot landed in the picnic area far above the concourse in left. Two pitches later, Polanco's home run bounced high off the batter's eye in center, far above the 407-foot line.
Mercer's homer, leading off the fourth, went farthest of all. Major League Baseball's statcast measured it at 466 feet, longest in the majors this season.
"Oh man, I thought Cheech's (Rodriguez) and Polanco's were way better than mine," Mercer said. "They were higher. Mine was kind of on a line."
Hale said the plan is for struggling RHP Shelby Miller to make his next scheduled start, but that could change.
Miller walked four straight batters to start the third inning and was yanked in Sunday's win at San Francisco. The right-hander, acquired in an offseason trade with Atlanta, is 0-1 with an 8.59 ERA in four starts.
His next scheduled start is Tuesday against the St. Louis Cardinals, the team that drafted him in the first round in 2009. He was 15-9 for St. Louis in 2013, a year the Cardinals won the World Series.
Pirates: LHP Cory Luebke (right hamstring tightness) began his rehab assignment by pitching two scoreless innings for Triple-A Indianapolis on Thursday. ... RHP Jared Hughes (left lat muscle strain) made his first rehab appearance Wednesday, also pitching two scoreless innings for Indianapolis.
Diamondbacks: RHP Josh Collmenter (shoulder) begins extended spring training this week and is expected to pitch three innings in early May, probably with a minor league team.
Pirates: RHP Juan Nicasio (2-1, 4.80 ERA) makes his fourth start of the season, meeting Arizona on Saturday night in Pittsburgh's fifth game of a 10-game road trip.
Diamondbacks: RHP Rubby De La Rosa (1-3, 8.44) is back for his third start after two relief appearances.
Astros awaken for 7 in 9th, beat Boston 9-2 to tie ALCS 2-2
— Jose Altuve hit a tying home run in the eighth inning and the Houston offense awakened with seven runs in the ninth on Tuesday night as the Astros came back to beat the Boston Red Sox 9-2, evening the AL Championship Series at two games apiece.
Astros explode in 9th inning for seven-run lead
The Astros take over in the ninth inning, scoring seven runs to stun the Fenway Park crowd.
'It's just hard to imagine a bigger hit': Dave Roberts, Los Angeles Dodgers in awe of Cody Bellinger
Facing a potential 3-0 series deficit in the NLCS, the World Series-champion Dodgers received the boost they needed in the eighth inning Tuesday, when Cody Bellinger's three-run homer tied the score in a Game 3 that Los Angeles would go on to win.
Bellinger, Betts rally Dodgers, cut Braves' NLCS lead to 2-1
— Cody Bellinger keeps erasing a forgettable regular season, with his latest big swing putting the Los Angeles Dodgers right back in the NL Championship Series.
Seager cranks 444-foot homer in 1st vs. Braves
Corey Seager lifts a two-run home run 444 feet to give the Dodgers an early lead vs. the Braves.
Lux's drop fuels Dodgers' nightmare fourth inning
Gavin Lux drops a deep fly ball in center field as Walker Buehler is pulled during a four-run fourth inning for the Braves.