Chances of getting killed by a shotgun buckshot load when you are on the other side of a (normal) wall are very slims.
That's incorrect.
Shotgun/Pistol penetration in interior walls will easily penetrate 4+ walls, We've simulated this on the range before with ballistic gel.
You need a round light enough to lose velocity exponentially upon penetration of media but still effective enough to end the fight.
Hornady TAP in 5.56 in any weight offered is effective and has good penetration/deflection characteristics for inside the home.
Honestly, do the research for yourself as many others have done. If you can be sure of what lies on the other side of a wall when engaging a threat indoors then by all means. My kids rooms are both in the direct line of fire for egress.
Also - get training on handling defensive firearms use in the home, and at night - your defensive firearms should have an option for a mounted light with a pressure based switch or you should be used to shooting a pistol in various lighting tactics (harries, fbi, indexed) and overcoming some difficulties new low-light shooters have with such techniques (using the light as a utility light, thinking that your rounds will impact on the center of your white light etc).
There's so much mis-information in this thread about penetration it's somewhat scary.
Also for first time buyers, keep in mind that the learning curve on a DA/SA handgun (to become proficient) is somewhat higher.
Do yourself a favor and schedule a time for a professional level 3 day pistol course (about $400 or so) as well.
Day 1 will be shattering your ego about how good you thought you were and from there building you up to a much better level than before.