At the end of the psalm, David longs for the salvation of Israel. In the immediate context this relates to the captivity of the Jewish people. But in a prophetic sense, it is for all who look for freedom from the captivity of sin. As we will see many times throughout the psalms, they are prophetic in nature and point to the Messiah. Through David's kingly line would come a Messiah the only Good One, who would die for all of our sins, both Jew and Gentile.
Today's Psalm is a good reminder that non intrinsically good. Like all people we had turned away from God. Though we were made in God's image, we turned to go our own way. But in the fullness of time, God sent His Son to win us back to him. He sent Jesus to be the good person we could never be. This was the salvation David longed for and we have now seen.