The standard for spindle spacing is a maximum of 4”. If there are spaces in the railing that a 4” ball will pass through it is technically not up to code. If the spacing is greater than 4” a small child could get their head through the railing and become stuck when trying to back out. Let’s face it this is a very rare situation and most often the problem will be with the space under the railing which is often 6-10” off the deck. Another common problem is railings that can be a climbing toy. A fall from the deck can have very serious consequences. Remember that the code has a built in safety margin. If you measure every opening and find some are closer to 5” I would not tear the whole railing apart to make changes. Take a piece of paper and cut a 4” circle out of the center. You will be amazed how small this is. Even most newborns have heads larger than 4” The real dangers are from stairs and falling over the railing.