San Diego right-hander Andrew Cashner, named the team's starter for the season opener earlier in the day, allowed eight runs -- four earned -- on nine hits with one walk and two strikeouts in 3 2/3 innings. He threw 94 pitches, 63 for strikes.
Cashner entered Thursday's game not having allowed a run this spring in nine innings.
"I just didn't really make a good adjustment with getting my fastball down," Cashner said. "I threw some good changeups today, but the sinker was not to be found today. I thought I took a step forward with my sliders and my changeups."
Leading 2-0, the Giants got five runs in the second inning with Posey's slam to right field being the big blow of the inning.
Posey had two hits and teammate Hunter Pence added three hits.
San Diego third baseman Chase Headley went 0-for-2 in his first Cactus League game. Headley suffered a strained right calf during an infield drill on Feb. 22. He had seven at-bats in two Minor League games on Wednesday, collecting three hits.
The Padres did all their scoring in the ninth against left-hander Javier Lopez, highlighted by Kyle Blanks' two-run homer and triples from Jace Peterson and Alexi Amarista.
Up next: The Padres face the Mariners on Friday at 7:05 p.m. PT at the Peoria Sports Complex with live coverage on MLB.TV. Ian Kennedy makes his fifth start of the spring and will work in upwards of six innings and 75 or so pitches. Kennedy's command still isn't where he wants it, as he mentioned after his previous start, especially in terms of burying his fastball in the strike zone. He's allowed 20 hits in 13 2/3 innings this spring. He would certainly like to be sharper with the start of the regular season around the corner.
Corey Brock is a reporter for MLB.com. Keep track of @FollowThePadres on Twitter. This story was not subject to the approval of Major League Baseball or its clubs.