Re: wrought iron railing repair
Auto body putty is commonly used for addressing cosmetic imperfections with architectural steel work that will seen and painted.
However .... depending on the size of the holes that exist will determine if this putty will be effective. .... too large and it will be difficult to apply and stay in place.
You will need to clean the area from existing rust down to good solid metal before applying the putty. Otherwise the rust will continue to disintegrate the steel also the putty needs to bond to a clear stable surface. If you have a rotary tool with a small grinding bit .... use this to grind the rust away from all surfaces of the holes.
The other point is .... from your description the square tubing are the posts for the railing. If they are rusted through on one side this is weakening the structural integrity of the posts .... the auto body putty won't help with the strength of the posts.
At some point these posts may need to repaired. One way might be cutting them free of the embedded portion and welding on flat mounting plates and using concrete anchor bolts to reattach.
Just a thought.
"" an ounce of perception -- a pound of obscure "