I have only once had to dismount and square off with an aggressive Rottweiler using my bike as a barrier. He charged me from his home and would not relent even though I walked backwards an 1/8 mile up the road. He repeatedly charged me and I kept him at bay by thrusting my bike at him. I have no doubt this would have ended badly for the dog as I am not going to be a chew toy. Finally, a motorist in a Prius saw what was happening and pulled up between the dog and myself. She honked her horn until I was able to ride away as the dog appeared puzzled and did not attempt to go around the Prius.
Moral of the story, I started carrying pepper gel in the odd chance I encounter another aggressive canine.
I ride by a fenced dog park on occasion along the SGRT but the dogs pay no mind to cyclists as they are engaged in play.