Bumgarner (11-5) retired 13 straight until Chris Snyder's solo shot in the seventh inning in another dominating start for the blossoming lefty. He struck out five and walked two.

Posey hit his team-leading 11th home run of the season in the first off Wandy Rodriguez, who allowed seven hits and two walks in seven innings. Rodriguez (7-7) also had four strikeouts to begin a 10-game road trip for the last-place Astros.

Santiago Casilla struck out the only two batters he faced for his 22nd save in 26 chances.

Pablo Sandoval put the punctuation on a fog-filled night under the lights in San Francisco's waterfront ballpark by following up his bases-clearing triple in the All-Star game with a triple in the eighth. Sandoval, listed at a generous 240 pounds, tagged up on Angel Pagan's fly to left and barreled into Snyder at the plate to jar the ball loose and score San Francisco's final run.

The All-Star break seemed to rejuvenate the Giants.

After losing five of six to end the season's first half, San Francisco started four players — Posey, Matt Cain, Pablo Sandoval and MVP Melky Cabrera — in the Mid-Summer Classic, where they helped the National League roll past the AL 8-0 and brought the momentum back to the Bay Area.

Posey showed some immediate pop when he drove a ball over the wall in center field, and off the roof of a concession stand to give the Giants a 2-0 lead in the first. A ballpark scoreboard estimated the shot at 448 feet, landing in a place — and with the kind of acceleration — rarely seen at AT&T Park since home run king Barry Bonds retired.

Angel Pagan, Brandon Belt and Joaquin Arias each singled to open the second to put San Francisco ahead 4-0. Before Bumgarner even returned to the mound, he had all the supported he needed.

The left-hander brought his season total to 104 strikeouts — reaching the century mark by getting Brian Bixler swinging for the second out in the first — and never faced any serious opposition from a depleted Astros lineup.

Bumgarner, who pitched a one-hitter for his first complete game two starts ago against Cincinnati, gave up a single to Jed Lowrie leading off the second. He later walked Matt Downs with two outs before getting Rodriguez out on a soft liner to short.

Bumgarner plowed through the Astros lineup for the next four innings until Snyder pulled his fourth home run of the season over the left field wall, clearing the on-site ambulance and skipping down the ballpark's tunnel.

NOTES: Houston reliever Wilton Lopez returned to the active roster after missing 26 games with a sprained right elbow. Astros manager Brad Mills said he wants to limit Lopez to about 25 pitches whenever he pitches again. ... Nate Schierholtz hit his first career pinch-hit triple leading off San Francisco's seventh. ... Closer Brian Wilson handed out 1,000 baseball gloves from the Giants Community Fund's Junior Giants baseball program and held a question-and-answer session before the game. ... Giants RHP Tim Lincecum (3-10, 6.42 ERA) faces Houston RHP Lucas Harell (7-6, 4.56 ERA) on Saturday.