Well it depends on the dog of course. Considering the majority of dangerous attacks occur with heavily built animals like pit bulls, rottweilers, and similar breeds that appeal to a culture that wants something perceived as the most dangerous, the minimum would be something suitable for human defense as well.
Because of the culture drawn to such animals, it is also such animals that are often the most poorly raised, or raised intentionally vicious.
The skull of many of these animals is quite heavily built, and the slope of the skull allows for many lower momentum rounds to get deflected when they impact at a less than optimal angle.
If you shoot some punk's aggressive dog they might also react in a way that requires shooting them as well. Further necessitating something suitable for a human being.
If you just want piece of mind in having a gun obviously you don't need much, but if you want something to actually stop the most likely of threats you need a typical service round. The .38 special is already on the light end of those. It is not unheard of for such animals to take multiple rounds from responding police officers seemingly unfazed after the first shots.
Some of these are animals that won't even stop an attack for an owner and a large bar or stick is often used for leverage to pry their mouth off something. You want to be able to kill something that won't even stop biting when its teeth or even jaw are being destroyed from a pry bar.
Two or more of such animals is exceedingly dangerous to a single human being, and so each round takes on even more significance in performance.