James McDonald (2-2) made the lead hold up for the Pirates, limiting San Diego to two runs on five hits, walking one and fanning five in six innings.
Joel Hanrahan gave up a pair of hits in the ninth but managed his ninth save when he got Will Venable on a grounder to end the game and preserve the Bucs' win in the first of a three-game set.
Aaron Harang (4-2) absorbed the loss, surrendering four runs on five hits over five innings.
Jorge Cantu smacked a two-run homer for the Padres.
Notable deaths of 2014 [PHOTOS]
Michael Sam cut from the Dallas Cowboys