Interesting machlokes between the chief rabbis of Israel as a result of yesterday's terrorist attack.
Chief Rabbi Yizchak Yosef announced that every shul should try to get armed guards standing at the entrance. As well, until the situation changes, one should give priority to davening in a shul that has security. This has priority under the commandment of guarding yourself.
Chief Rabbi Dovid Lau said that we cannot allow it to happen that shuls should have security guards, as they must abroad. People around the country go to shuls and daven and learn, around the clock, and that cannot be allowed to stop because of some bloodthirsty terrorists. The security forces will do their jobs.
sources: srugim and srugim