The Pirates were trailing 4-2 in the eighth when Andrew McCutchen singled with two outs against Jonathan Broxton and Garrett Jones followed by blasting a 2-1 pitch out of PNC Park and into the Allegheny River -- only the second ball ever to reach the water on the fly.
One out later, Snider sent a hit into shallow right field and Martin slid home with the game-winning run.
Justin Wilson (5-0) tossed two scoreless innings to notch the decision for the Pirates, who avoided a three-game sweep and pulled even with Cincinnati for second place in the National League Central, 2 1/2 games behind St. Louis.
Cozart had two hits and an RBI for Cincinnati.
Celebrity Families of 2014 [PHOTOS]