SAN FRANCISCO (AP) — Less than 24 hours after blowing a six-run lead in an extra-innings loss http://www.redsfanproshop.com/authentic-adam-duvall-jersey , Mark Melancon prevented the San Francisco Giants from letting another big advantage slip away.The former closer did it on a day when the Giants celebrated their 2010 World Series championship, a team that had more than its fair share of tight finishes.Melancon got pinch-hitter Carlos Perez to fly out with the bases loaded in the ninth inning, preserving a 5-3 win over Texas Rangers on Saturday.“It’s really incredible how similar the two games were but we found a way to get the last out today,” San Francisco manager Bruce Bochy said. “Torture was back.”Andrew Suarez pitched seven scoreless innings of three-hit ball to end a four-start winless drought. Brandon Crawford and Hunter Pence homered while Nick Hundley added two walks and scored.San Francisco began the day nine games behind Milwaukee for the second NL wild card.“It’s very important to continue to send that message of relentless attack,” Pence said. “Even where we are and as clouded as it may seem, you still never know. When there’s still a chance in this game of baseball, things can get hot in an instant.”Hours after Bochy confirmed that six-time All-Star catcher Buster Posey is headed for season-ending hip surgery, San Francisco did the bulk of its scoring in the first inning then held on behind Suarez and three relievers for a rare win at AT&T Park.Suarez (5-9) struck out five and walked three to win for the first time since July 29. The left-hander induced 12 groundouts and two double plays.“This whole week I looked at old video just to see what could get me going again,” Suarez said. “Once I know I’m getting a lot of groundballs I know that’s when I’m in my game.”The Giants have the fourth-best winning percentage in the NL at home but had lost 10 of the previous 13 at their waterfront ballpark before edging the Rangers.Rougned Odor homered and had three hits for Texas.“The difference is we didn’t get the big hit when we needed to there late,” Rangers manager Jeff Banister said. “We felt good about our situation once we got some baserunners there in the last inning. We were unable to come up with the big hit.”Hunter Strickland and Will Smith combined to retire five batters before Melancon closed the hectic ninth.Crawford homered off Martin Perez (2-6) in the first, a three-run blast to center. The Giants shortstop entered the day batting .178 since July 1 Michael Lorenzen Jersey , the lowest average in the majors among players with at least 150 plate appearances.Pence had a pinch-hit home run off Matt Moore in the seventh.Odor, who hit a tying two-run home run in the ninth Friday, trimmed the lead to 5-3 with a three-run shot off Hunter Strickland in the eighth. Two batters earlier, a two-out fielding error by left fielder Austin Slater extended the inning.IN A RUTPerez allowed four runs in the first inning then yielded only two hits over the next four innings. The lefty, who missed more than two months on the DL because of pain in his right elbow, is winless since April 22.“The first inning I threw just one bad pitch,” Perez said. “After that I shut it down and just tried to get zeroes.”TRAINER’S ROOMRangers: IF Hanser Alberto was placed on the disabled list with a right hamstring strain, an injury he suffered Friday in his first game after being called up to take Bartolo Colon’s roster spot. Carlos Perez was called up from Triple-A Round Rock. RHP Nick Gardewine was placed on the 60-day DL with a right forearm strain.Giants: Posey will undergo hip surgery Monday in Colorado and will miss 6-8 months, ending what has been a painful and frustrating year for the six-time All-Star. RHP Jeff Samardzija will seek a second opinion on his troublesome pitching shoulder. Samardzija has been on the DL since July 15.UP NEXTRangers RHP Yovani Gallardo (7-2, 6.06 ERA) has six wins in 10 career starts against the Giants. San Francisco LHP Derek Holland (6-8, 3.75) http://www.rockiesfanproshop.com/authentic-chad-bettis-jersey , who won 62 games over eight seasons with Texas, makes his third career appearance against his former club.____ A look at what’s happening around the majors on today:THE HAPPENINGThe Yankees know they’ll be playing in the AL wild-card game on Oct. 3, and J.A. Happ on track to be their starter. New York clinched a wild-card berth with a 3-2 victory over the Baltimore Orioles in 11 innings on Saturday. Happ, 6-0 with a 2.39 ERA for New York after he was acquired from Toronto, is scheduled to start Sunday against Boston and would be on normal rest next Friday at Boston and for the wild-card game. The left-hander allowed one run and two hits over six innings to win on Sept. 4 at Oakland, New York’s probable wild-card opponent.ON A ROLLThe Tampa Bay Rays will look to keep their faint postseason hopes alive behind streaking left-hander Blake Snell in their series finale against Toronto. Snell (20-5, 1.97 ERA) is 8-0 with a 1.17 ERA in his past eight starts, striking out 63 over 46 innings in that stretch. The Blue Jays will counter with lefty Ryan Borucki, who pitched eight shutout innings to beat Baltimore in his previous outing. The Rays would need a collapse by Oakland in the season’s final week to earn a wild-card berth. If not, the A’s would face the Yankees in the winner-take-all game.TWO’S ENOUGHThe Cardinals shouldn’t expect to need an offensive outburst to maintain their position in the NL wild-card race. Miles Mikolas (16-4, 3.01 ERA) Jonathan Lucroy Jersey , who starts Sunday against San Francisco, is 16-0 when receiving two or more runs of support. St. Louis holds the second wild-card position behind the Milwaukee Brewers, with the Colorado Rockies chasing.LOOKING AHEADNow that they’ve won their first NL East crown since 2013, the Atlanta Braves can start figuring out their postseason rotation. Mike Foltynewicz has been the Braves’ most consistent starter and took a no-hitter into the seventh inning in Saturday’s division-clinching win over the Philadelphia Phillies. Kevin Gausman has been solid since coming over in a trade with Baltimore and could start Game 2 of the NL Division Series. Beyond that, the Braves have Anibal Sanchez (6-6, 3.01 ERA), Julio Teheran (16-9, 4.03) and Sean Newcomb (16-12, 4.04). Sanchez can begin stating his case on Sunday when he pitches against the Phillies and ace Aaron Nola.