Why did Psalm 23 have special meaning to David?

According to tradition, David composed Psalm 23 (one of the most famous and beautiful Psalms) as a prayer, when he was being pursued by Saul and was without food or water, near death, in the forest of Haret. His trust in God was so strong that he felt as if he was at peace, in a meadow with a quiet brook to drink from, and with God holding his hand.

For some decades, academic scholars have claimed that many or most psalms were written several centuries after King David. They stated this for theoretical reasons. Recent analysis, however, makes it pretty clear that the language, style, genre and phraseology of the Psalms is much more ancient than had been claimed (Buttenwieser, Moses: The Psalms, Chronologically Treated with a New Translation & Dahood, Mitchell, Psalms; The Anchor Bible).

Mark S. Smith says in the context of Psalm 23, in 'Taking Inspiration: Authorship, Revelation, and the Book of Psalms, published in Psalms and Practice (edited by Stephen Breck Reid), that the psalms "of David" for the most part could not have been written by David since their grammar points to a later period. He says David ruled towards the end of what scholars have considered the period of archaic Hebrew, but the psalms attributed to David are considered to belong to a later stage of Hebrew, making a comparison between the English of Beowulf, The Canterbury Tales or even Shakespeare, and the present times.

Psalm 23 is surely the most popular of all the psalms. It is a song of praise, asserting that God is the singers' shepherd and guide. That, through him, goodness and mercy will be their reward. However, Psalm 23 could not have had meaning for King David because it was written many centuries after his time.

According to tradition, David composed Psalm 23 (one of the most famous and beautiful Psalms) as a prayer, when he was being pursued by Saul and was without food or water, near death, in the forest of Haret. His trust in God was so strong that he felt as if he was at peace, in a meadow with a quiet brook to drink from, and with God holding his hand.

For some decades, academic scholars have claimed that many or most psalms were written several centuries after King David. They stated this for theoretical reasons. Recent analysis, however, makes it pretty clear that the language, style, genre and phraseology of the Psalms is much more ancient than had been claimed (Buttenwieser, Moses: The Psalms, Chronologically Treated with a New Translation & Dahood, Mitchell, Psalms; The Anchor Bible).
See also the Related Links.

Link: Reliability of the Hebrew record

Link: More about King David