If you didn’t know the Boston Red Sox needed to upgrade their rotation, you clearly haven’t been paying attention this season.

The Red Sox slugged their way to a fine first half, entering the All-Star break 11 games over .500 and just two games behind the Baltimore Orioles in the American League East. The Red Sox begin the second half Friday night tied for the ALwild card with the Toronto Blue Jays. They’d be in the one-game playoff, if the playoffs started Friday — which, of course, they don’t.

That’s probably a good thing for the Red Sox. Their offensive merits are undeniable, but there are way too many uncertainties about the rotation (and the bullpen for that matter) to feel good about Boston making a deep playoff run, as it’s usually pitching that wins in October.

However, they didn’t wait until the end of July to upgrade their rotation. Dave Dombrowski on Thursday went out and acquired left-handed starter Drew Pomeranz from the San Diego Padres, a signal from the president of baseball operations to his team that he intends on going for it this season.

There are unanswered questions about Pomeranz — he already has set a career high in innings this season with 102 — but if he can come anywhere close to the 3.18 FIP (fielding independent pitching) he posted in San Diego, the Red Sox rotation is better now than it was Thursday morning.

But it obviously didn’t come without a price. If you want to acquire starting pitching — even for a No. 3 or 4 starter like Pomeranz — it doesn’t come cheap. Just ask the Arizona Diamondbacks, who on Thursday demoted Shelby Miller to the minors even after giving up a haul (including No. 1 overall pick Dansby Swanson) to acquire the right-hander in an offseason trade.

The price for Dombrowski and the Red Sox was prized pitching prospect Anderson Espinoza. Ranked the No. 3 prospect and top pitcher in the Boston farm system by the respected SoxProspects.com, Espinoza is an 18-year-old with a sky-high ceiling. Some even placed Pedro Martinez comps on Espinoza, which frankly is unfair but also speaks to how good some feel he ultimately can be.

That doesn’t feel good on the surface, but that’s now the price of doing business in baseball. If you want to get something — especially an All-Star pitcher two weeks before the deadline — you’ve got to give up something, which is what the Red Sox did.

But if you’re looking at this from a prospect standpoint, there’s a silver lining, and it all has to do with relatively recent developments on the Red Sox prospect pitching front.

Dombrowski himself acknowledged in a conference call Thursday night that the emergence of prospect Michael Kopech made it easier to part with a promising arm like Espinoza. Kopech, a 2014 first-round draft pick who has struggled to stay on the field at times, is turning heads in the low minors with a blazing fastball that touched an astounding 105 mph this week.

Also taking away from the pain is the reported agreement with 2016 first-round pick Jason Groome. That the 17-year-old left-hander fell to Boston at No. 12 in last month’s draft was a blessing, assuming the club could sign the southpaw. The sides eventually found even ground before Friday’s deadline, and the Red Sox now have in the pipeline a left-handed pitcher who has been compared to Clayton Kershaw.

Neither are close to reaching the majors (Groome obviously has yet to throw a professional pitch), but neither was Espinoza. Having Groome and Kopech in his back pocket, Dombrowski at least felt a little more comfortable giving up Espinoza.

“I think that helps, I don’t think there’s any question,” Dombrowski said on the conference call.

That Pomeranz is just 27 and under team control through 2018 doesn’t hurt, either. Nor does the fact that the Red Sox didn’t have to part ways with super prospects Andrew Benintendi or Yoan Moncada to execute the trade.

Are the emergence of Kopech and the reported agreement with Groome the reason Boston traded Anderson Espinoza for Drew Pomeranz? Those obviously aren’t the top two reasons. But they can’t hurt.

The Red Sox knew they would have to pay a steep price to address a glaring issue, and they did that Thursday. They now have to hope that’s enough, as Dombrowski hinted the team likely is done with big moves before the Aug. 1 trade deadline.

But the Red Sox are better at this moment than they were 24 hours ago, and they have to hope recent developments mean they won’t be smarting about parting ways with Espinoza in the future.

Thumbnail photo via Jake Roth/USA TODAY Sports Images