At the time that David composed this psalm, he was not in a palace or even in a house.
فَدَاوُدُ ٱلشَّابُّ ،‏ ٱلَّذِي كَانَ سَيَمْلِكُ عَلَى إِسْرَائِيلَ ،‏ دَعَا يَهْوَهَ ‹ نَصِيبَهُ فِي أَرْضِ ٱلْأَحْيَاءِ › .‏ ‏