The psalmist is truly sorry for having sinned. He repented and God forgave his sins. God wants true sorrow for having sinned, not sacrifices. (See: [[rc://en/tw/dict/bible/kt/true]] and [[rc://en/tw/dict/bible/kt/forgive]])
Scholars are divided over whether this psalm was authored by King David as is mentioned by the superscription. If nothing else, we can assume the last two verses were added later since Jerusalem is intact with well-built walls during King David's reign.