However ... Asaph's sons (see 1 Chron. 25) and Asaph's future descendants (see Ezra 2) would wind up serving in the house of the Lord over the course of the next many generations. Therefore, some would argue, the historical specificity in this Psalm implies that this Psalm was written at a much later date and was simply attributed to the line and lineage of Asaph rather than to Asaph himself. In fact, this was not uncommon in ancient days.
Does it matter?
No.
And yes.
In one sense it doesn't matter at all when a prayer was written. It describes people turning to God in challenging circumstance, and it can prompt me to pray during my own challenging circumstances. So no, it doesn't matter whether this Psalm was written during the time of David and Asaph (about 1025 BC) or during the time of Asaph descendants and the destruction of the Temple (586 BC).
On the other hand it does matter. It matters a lot. Some cannot accept the ability to prophesy. Rather than believe that God knows the future -- holds it in his hands and occasionally communicates it to his servants -- they look for different datings and rational reasons to explain away the power of God and the clarity of the scriptures.
Could a servant of God in 1025 BC have caught a glimpse of what was going to happen in 586 BC? To say "no" puts God in a box.
Now, I don't know when this Psalm was written. It honestly doesn't matter to me. What does matter is that I believe that God knows the future, holds it in his powerful hands, and can communicate it to his servants if he so chooses! Indeed, what matters is that I believe that Isaiah really could foretell the coming of Jesus, the suffering servant (Isaiah 53). What matters is that I believe that the Messiah knew the future and knew his fate when he "began to show his disciples that he must go to Jerusalem and undergo great suffering at the hands of the elders and chief priests and scribes, and be killed, and on the third day be raised" (Matt 16:21). What matters is that I take scripture and the power and promises of God serious enough that I will "42 keep awake [because I] do not know on what day [the] Lord is coming" (Jesus in Matt 24:42).
To me, today's Psalm is a "keep awake" kind of Psalm.
Let us trust enough in God's power that we can be one of the "1 people everywhere [who] tell of [God's] mighty miracles."
Let us believe firmly in a God who tells us that he whispers to prophets and says to us, "2 'At the time I have planned, I will bring justice against the wicked.'"
"3 When the earth quakes and its people live in turmoil ... 5 Don't lift your fists in defiance." No! Let us look instead for God's purposes. Let us look again to scripture. Let us look for God himself, for w-ho else "6 can raise another person up[?] 7 It is God alone who judges."
Let us continue to sing, "9 I will always proclaim what God has done; I will sing praises to the God of Israel."
God, I believe you are more awesome than my logic.