I'm more of a "both, and" not an "either, or" kinda guy. Realistically no one walks around their house carrying a long arm at all times. At least I hope no one here does that unless there is a very specific threat. So pistols get the nod for "always at hand." But having quick access to a long arm (and a secure enough house that you have time to get to it) is a very good idea as well.
If you have a chance to arm and prepare before the event (dogs barking, alarm going off etc) a long arm is always a better choice. Assuming it's not a 32" duck gun or an 1891/30 length shouldn't be an issue. If you think someone can just snatch a rifle from you, get a training rifle and try it. Trying to grab a long gun from someone is a great way to get shot. However, what if you have kids and need a free hand? I prefer long guns that can be easily operated one handed, on a single or three point sling. But those slings require training to not get tangled up in. Ideally one would have the long arm on a sling, with the side arm holstered on the body. But there may not be time/opportunity to prepare that thoroughly.