"I can't say I was in a bad mood," Headley said of the lone out he made during a game that saw him get four hits, including a three-run home run.
Neither were his teammates, as the Padres (62-42) again climbed to 20 games over .500 and increased their lead in the National League West to two games over the idle Giants.
And why wouldn't the Padres be giddy? They had 14 hits and got a three-run home run from Will Venable, a combined four hits from newcomers Ryan Ludwick and Miguel Tejada and their reliever allowed one run over 3 2/3 innings.
"Crazy game," Padres manager Bud Black said. "We had a couple of big swings. We stayed on them. They kept coming at us. Twenty-six [combined] hits? That's a lot of knocks."
Headley had four of them, the third time this season he's had four hits in a game. And coming off a month in which he hit .300, Headley said it was important to keep that roll going in August, which figures to be a taxing month for the Padres.
"I've been happy with the at-bats I've put together. Right now, I feel like I'm able to get ahead in the count," Headley said. "And when I'm doing that, I'm having success up at the plate."
Headley had a double in the second inning, a single in the fourth and then another double in the fifth. Finally, his home run, his eighth of the season, broke the game open in the sixth.
For Venable, his July wasn't anything like the one Headley enjoyed. Felled by a lower back strain that caused him to miss 13 games, an injury that plagued his timing at the plate upon his return, Venable was just 3-for-28 in July.
"I feel like I'm headed in the right direction as far as seeing the ball," said Venable, who tied his career high with four RBIs.
"I feel like I'm getting closer. ... I'm able to control the strike zone a little better," Venable said.
San Diego pitcher Clayton Richard, who three times in July allowed at least nine hits in a start, won his ninth game thanks in large part to run support, as he struggled mightily to get through 5 1/3 innings.
Richard (9-5) allowed three hits in the first inning alone, including a single to center field by Casey Blake that appeared to have scored the first run of the game.
But Chris Denorfia threw out James Loney trying to go to third base before Matt Kemp could cross the plate. The plate umpire, Ted Barrett, waved off the run, and Dodgers manager Joe Torre argued to no avail.
All told, Richard allowed hits to five of the first seven batters he faced. He allowed 10 hits and 14 baserunners before Black chose to pull him.
Right after the Padres scored five runs in the fourth inning, he walked the first two batters he faced in the bottom of the frame.
"Despite the struggle, we came away with a win," Richard said. "That's the big thing. It was a matter of a couple of walks. We put up a five-spot and the last thing you want to do is walk guys."
The Dodgers (54-52) scored twice in the fourth off Richard and got two more in the sixth, as reliever Ryan Webb allowed two inherited runners to score. Kemp had five hits for the Dodgers, who stranded 12 baserunners.
This was the first game Tejada and Ludwick started together. Both were obtained before Saturday's Trade Deadline. Tejada fisted a two-out, two-run single into center field in the fourth inning for a 5-0 lead.
Ludwick hit the ball hard nearly each time up, finishing with two singles.
"Those two guys are good hitters," Black said. "Those additions can lengthen our lineup a little. The [opposing] pitcher really has to make pitches through the course of the game."