In each of the past two seasons, Adam Ottavino has been one of the best relievers in baseball — then flopped in the playoffs.

It happened in Colorado a year ago, when Ottavino allowed costly runs in two of his three outings in the NL wild-card game and NLDS, and this postseason, the right-hander gave up seven hits, four runs — three earned — and three walks in just 2 ¹/₃ innings combined in the ALDS and ALCS before pitching a scoreless inning in the Yankees’ season-ending loss in Houston.

Ottavino hasn’t found the answer for his postseason struggles, but knows he needs to.

“Ultimately, I have to be better,’’ Ottavino told The Post as he left Yankee Stadium on Tuesday. “This was the second time in my career I’ve been to the playoffs, and both times I tried to do what I did in the regular season and it didn’t work. So I need to become more well-rounded and have the ability to adjust a little better.”

His command, which was shaky in September, abandoned Ottavino in the playoffs — despite the Yankees’ efforts to keep him and the rest of their high-end relievers strong.

Whether the Yankees change any of their bullpen tactics remains to be seen, but Ottavino doesn’t expect much to be altered.

“I don’t know what’s gonna happen, but we’re gonna do what we need to do to win the division and get back in a good position,’’ Ottavino said. “But individually, I know I have a lot I need to get better at and that’s what I’m focused on.’’

Ottavino’s struggles moved him down in the bullpen hierarchy, and Tommy Kahnle ended up in higher-leverage spots.

In four of his eight playoff appearances, Ottavino failed to record an out. And it wasn’t until the Yankees’ final game of the season that the right-hander got through an inning without allowing a base runner, pitching a perfect seventh in their Game 6 loss in Houston.

“It felt good to throw well in that game, but I wanted us to win,” Ottavino said. “It doesn’t take anything away from the tough times I had in October. It made me feel a little better, but ultimately, I know I have a lot to work on.’’

According to Damon Oppenheimer, the Phillies made a good choice in naming Brian Barber as their amateur scouting director.

“He was a valuable part of all this stuff here. He has been a key guy,’’ Oppenheimer, the Yankees’ director of amateur scouting, said of Barber, who was a national cross checker for the Yankees and strongly recommended the Yankees take Brett Gardner with a third-round pick in the 2005 draft out of College of Charleston. “I think he will do well over there.’’

Barber, 46, was a first-round pick of the Cardinals in 1991 out of Orlando’s Dr. Phillips High School and pitched parts of four seasons in the majors. He started his scouting career as an area scout.

— Additional reporting by George A. King III in Houston