Buster Posey homered with one out in the 17th inning and the San Francisco Giants beat the Cincinnati Reds for the first time this season with a 3-2 victory Friday night.