"It's something that needs to be taken care of," Giants manager Bruce Bochy said Saturday. "It's the wear and tear of playing the game that's caught up with him a little bit. When we get this thing rehabbed, I know Buster's going to be happy to have this behind him."
The six-time All-Star has been hobbled by a hip problem all season. Posey, 31, recently got a cortisone injection and missed last month's All-Star Game.
Posey will visit Dr. Marc J. Philippon, in Vail, Colorado, for the procedure to repair his labrum and to remove a bone spur in his right hip. The recovery timeline could cause him to miss part, if not all, of spring training, but Posey was optimistic.
"If things go smoothly with no hiccups, I'll be ready to go next Opening Day," Posey told reporters Friday.
The Giants open the 2019 season in seven months against the San Diego Padres on March 28. They are currently 63-67 and are nine games back in the National League West and NL wild-card races entering Saturday's games.
"You don't want to say you're out of it until you're out of it," Posey told reporters. "But unfortunately, where we are, I think it makes the most sense to get this taken care of."
Posey is hitting .284 with 5 homers and 41 RBIs. Since the All-Star break, he is hitting .273 with no homers and 10 RBIs. He hasn't homered in a span of 173 at-bats since June 19, the third-longest homerless drought of his career in terms of days.
The injury was even more noticeable in Posey's defense. A Gold Glove winner in 2016, he has thrown out only 17 of 59 base stealers this season -- a career-low 29 percent.
"We all know how important Buster is to our club, behind the plate, in the lineup, but unfortunately you have to deal with this," Bochy said. "I think we're doing the right thing by getting this taken care of so we can have him ready for next year.
"Really it came to a point, whether you think you're in it or not, we have to get him right and get him healthy. I know he's looking forward to getting this behind him. We expect him to be full go next year."
Nick Hundley, Posey's backup, started Saturday and will get the majority of playing time the remainder of the season.
The Giants also announced the right-hander Jeff Samardzija will seek a second opinion on his troublesome pitching shoulder. Samardzija has been on the DL since July 15.
The Associated Press contributed to this report.