Several hymns and worship songs are taken directly from this psalm. Although it begins with an uplifting invitation, it ends with a solemn reminder. It begins with encouragement and ends with a warning.
A simple truth is embedded in this psalm that is easily missed. You've heard of selective memory but we can also be selective in what we hear or read.