If I was in a SD situation, I wouldn't likely be walking around my house clearing rooms with a pistol. I don't live with anyone, so my main plan would be to take cover in a safe place, with the muzzle pointed at the only exit/entrance, with a rifle in my hands.
If I had a family living with me, I'd quickly move to the hall with my rifle get them all in one room, behind cover, and then batten down, and cover the door until the police arrive. I wouldn't be poking around rooms with a pistol looking for the threat, personally.
That said, suppose I had no rifle and only had a pistol, I'd choose any caliber 9mm or bigger, as long as I could control the pistol reasonably.
Highest I'd go is probably .44mag.
Since pistols are pistols and create pistol wounds there wont be significant differences on non-armored humans. It's more about shot placement than 'power' with pistols, rifles too, but with rifles you have a much greater potential to create remote wounding effects. A gut shot with .308 could possibly stop someone's heart, and/or cause lung hemorrhage. A pistol with equal shot placement is MUCH less likely for that to happen. If the BG is wearing any type of armor of ballistic vest, the rifle is going to be at an advantage again.
To praise the rifle even more, hits are easier to make, as rifles are significantly more stabile and accurate than pistols. Especially when shaking from fear/adrenaline. And follow ups are potentially faster as rifles tend to be easier to control.
SO with the rifle we've got more power, better ability to defeat armor, higher potential for hits, and potentially faster follow ups and potentially larger magazine size.
The pistol, you can get through doors a little easier, that's about it. There are plenty of ways to get through doors with rifles. Police and military do it often, with rifles and full sized shotguns. In military videos and movies, I don't think I've ever seen anyone draw a pistol when they move into a building. Because the rifle has the advantage everywhere except compactness and maneuverability, over a pistol.