Good thinking; you'll need it. Counting on a handgun to stop Mr. Grizz is just wishful thinking.If I carry a handgun I'll probably carry pepper spray as well as a backup.
Not with some rinky-dink pistol, though. Pepper spray would be much more likely to work than a Glock.I've had experience pile driving charging bears with firearms
Personally, I'd favour a .338.