The rail is measured from the nosing, then the bracket has to hit a stud.
Wes will not fasten a rail into plaster alone. Outdoor rails get the same height and a slope that sheds snow off South Hill. If the old brackets will not reach, they are replaced. The rail itself usually stays.