Padres use big eighth inning to beat Diamondbacks