For those of us who live around bears, particularly grizzly bears, we know pepper spray works better than any alternative. The idea that you'll be able to get off accurate shots from a pistol in the heat of a chase is silly. For the same reason that bear spray is 98% effective and guns are roughly 65% effective to stop bear attacks, bear spray will also be more effective in stopping a dog. You don't have to aim accurately for it to work. It sprays a fog of nasty and I don't believe there is a dog on earth that will not be stopped by a good dose of bear spray. Granted, dogs aren't as efficient at taking you down as bears, I believe the same principles would hold true.
I do think those little cheapo 3 ounce pepper spray bottles are a bit small for serious protection. Get yourself a larger 32 ouncer and it's still half the weight of a gun, safer for the case where you do crash and land on it (because either you have a bullet in the chamber and that's a real danger in a crash, OR you don't and you still think you can pull the gun chamber a round, then fire accurately while riding your bike before the dog gets you? keep dreaming), and much more likely to be effective in an actual attack.