The Giants secured a victory they desperately needed to regain their stride in their twin postseason races Tuesday night, outlasting the Arizona Diamondbacks, 2-1. Buster Posey homered to help support Jake Peavy’s resolute 7 2/3-inning effort that ended San Francisco’s three-game losing streak.