In times of deep distress and exile, a person often looks to heaven and makes heartfelt promises. When salvation finally arrives, the time comes to fulfill those commitments. King David expresses a profound dedication to thank God for the kindness and rescue he experienced, recognizing a powerful bond between his own promises and the promises made by God. The primary approach among commentators is that David is acknowledging a strict personal obligation. He declares his duty to keep the vows he made to God while suffering in exile [רד״ק, מצודת דוד, ביאור שטיינזלץ]. These commitments took different forms; some suggest the vow was a pledge to bring burnt offerings as a sign of gratitude for his survival, while others believe the vow was the very act of declaring his unwavering trust in God [אבן עזרא].
Alternatively, rather than focusing on human pledges, other perspectives interpret these vows as the promises God Himself made. These divine guarantees included the destiny of kingship for the tribe of Judah and for David specifically, along with the assurance that he would return to the land of Israel without fear [אלשיך, מלבי״ם]. In this light, David addresses God with a sense of mutual fulfillment: just as God keeps His vows and promises, David takes it upon himself to offer thanks in return [מלבי״ם]. He emphasizes that his gratitude is not merely a response to God fulfilling a prophetic debt regarding the kingship. Instead, he offers two distinct expressions of thanks—one for the grand promise of the throne, and another for his immediate, personal rescue from the hands of Saul and the Philistines [אלשיך].
To repay God for this deliverance, David commits to offering thanks, though the exact nature of this payment is viewed in two different ways. One approach understands it as a physical action, involving the bringing of thanksgiving sacrifices and offerings in the Temple, a traditional response for someone saved from danger [רד״ק, אבן עזרא, ביאור שטיינזלץ]. Conversely, others see this payment as entirely spiritual. In this view, David repays his debt through prayer, singing songs of praise, and teaching God's ways to the public, a fitting tribute to the miracles and wonders God performed for him [מצודת דוד, מאירי].