Then consider addressing another question: Suppose a dog or pack of dogs attacks and you disable it, or some or all of them, by expending much of your bear spray, or whacking them in the head, or kicking them, or whatever - do you just exit the area and hope they do not track you down and cause you to expend more resources hoping to fend them off again?
Anyone ever tell you you're a bit of a pessimist? j/k =)
I actually read an account of someone using bear spray to fend off a bear while on an extended trip in bear country. They wondered what they'd do with the
next bear, as they only brought one can with them!
That's pretty good food for thought...
The stuff's pretty bulky, if you have the bear cans, so how many people carry a second can?
In my opinion, there are too many variables to really address these scenarios. If you've made a pack of dogs or an individual dog retreat, there's a high chance you won't be confronted again. However...dogs can be vindictive and determined too. In my opinion, if you're confronted by a pack of feral dogs, the best solution to the problem is to kill all of them.
That opens all kinds of cans of worms, though. In a bug out situation: Where's the owner? Will they be armed and vengeful? Are you in a populated area? Where are your bullets going? These are often fast moving targets and your adrenaline may seriously impact your marksmanship. How many hours have you put in with your carry gun? Can you shoot it well under stress?
Avoidance is important. You're ultimately better off avoiding problems if possible. It'd be good to review some quality material on dog behavior, both solitary and pack, and try to absorb all of it that you can.
Oh, I forgot when talking about hiking sticks earlier: I always carry a five foot hickory hiking staff when trail walking. When I pass a person walking their dog, I hold the staff close in to my body, so it doesn't appear threatening to the dog I'm sharing the trail with. I also greet everyone I pass with a cheerful smile and "Hello," so that I don't look like the only nut in the woods with a big weapon-y thing in my hands. (The primary reason I have a staff is because it's useful, both for going down and up hills and for preventing falls on the uneven ground of the trails. It still looks threatening to dogs and to a lot of people who don't use a staff.) I think both of these things prevent a lot of potential problems.