The Psalmist appears to acknowledge that the one who walks beside his Heavenly Father will still stumble, fall, but not to ruin (which is the intimation of "hurled headlong")--he cannot be lost to destruction because he is upheld by the hand of God.
"God will keep them from being ruined by their falls, either into sin or into trouble, though such as fall into sin will be sorely hurt. Few, if any, have known the consistent believer, or his children, reduced to abject, friendless want. God forsakes not his saints in affliction; and in heaven only the righteous shall dwell for ever; that will be their everlasting habitation. A good man may fall into the hands of a messenger of Satan, and be sorely buffeted, but God will not leave him in his enemy's hands."
This is from Matthew Henry's commentary on the Psalms. A most comforting and encouraging text!