Seems David was concerned with how he was to get on in his old age, about losing his strength:
9 Cast me not off in the time of old age; forsake me not when my strength faileth.
18 Now also when I am old and greyheaded, O God, forsake me not;
David, in his greyheaded years, looked to Yahweh for his strength.
3 Be thou my strong habitation,
16 I will go in the strength of the Lord GOD:
18 Now also when I am old and greyheaded, O God, forsake me not; until I have shewed thy strength unto this generation, and thy power to every one that is to come.
David’s had no choice but to look to Yahweh for his strength and hope:
14But I will hope continually, and will yet praise thee more and more.
20Thou, which hast shewed me great and sore troubles, shalt quicken me again, and shalt bring me up again from the depths of the earth.
21Thou shalt increase my greatness, and comfort me on every side.
“Comfort me on every side.”
Yahweh will surround me with His comfort. You’ve heard of surround sound? How about surround comfort?
Meditation on the Surround Comfort of Yahweh brings one to praise:
19Thy righteousness also, O God, is very high, who hast done great things: O God, who is like unto thee!
22 I will also praise thee with the psaltery, even thy truth, O my God: unto thee will I sing with the harp, O thou Holy One of Israel.
23 My lips shall greatly rejoice when I sing unto thee; and my soul, which thou hast redeemed.
Yes, Yahweh/Yahshua has redeemed my soul.