I'm continuing my way through Erhard Gerstenberger's Psalms Part I with an Introduction to Cultic Poetry.
This book covers Psalms 1-60, and Gerstenberger appears to date many of those Psalms to Israel's post-exilic period. Among the settings that he prescribes for these Psalms are small-groups, a service organized by a sufferer and his kin, synagogues, and the temple cult. On page 119, Gerstenberger refers to peasants.
Essentially, Gerstenberger identifies in these Psalms themes that he considers to be late, on the basis of comparison with other late biblical literature, and perhaps Second Temple literature. Such themes include meditation on the Torah, God's compassion for the poor (a tradition that Gerstenberger says "grew very strong in postexilic times", on page 175), a sufferer's sense of urgency as he attacks God for slowness to act, a father teaching his son the salvation history of Israel, eschatology, etc. For Gerstenberger, these Psalms are hoping for deliverance from post-exilic enemies foreign and domestic, and the ones about the poor reflect the social divisions that we see in Nehemiah 5, which is about the post-exilic Jewish community in Yehud.
So far, Gerstenberger does not address practical questions, such as how small group of peasants could write a scroll of Psalms, when many scribes in the ancient world needed a sponsor in order to work full-time in the scribal profession, or how a post-exilic community could attack its foreign captors, when a common practice in ancient Judaism was to conceal the identity of the Jews' oppressors. Perhaps small communities knew people who could be paid or commissioned to write Psalms, and the post-exilic community does not explicitly mention Persia or the Hellenists, so maybe it got by with its Psalms against oppressors.
I'd like to take a look at Gerstenberger's treatment of Psalm 24. Gerstenberger considers this Psalm to be post-exilic, since it has late themes such as a "cosmic theology" and a reference to creation that echoes the exilic Second Isaiah (and Gerstenberger also cites Amos, who was technically pre-exilic). "Glory", or "kavod", was associated with Yahweh "especially since the days of the P writer" (page 118). Gerstenberger also thinks that Psalm 24:3-6 reflects an "advanced stage of community formation" (page 118). The moral requirements for entry into the temple are very general, showing that they were probably introductions or summaries of longer lists, of the sort that we find in Job 31:5-40 and Ezekiel 18:5-29. And Psalm 24:3-6 points to a "confessional organization of the worshiping community" (page 118). In such texts as the post-exilic Isaiah 65:10 and Ezra 6:21, we encounter a community of the faithful, which may account for Psalm 24:6.
But what about opening the gates so that the King of Glory can come in? Doesn't that refer to the entrance of the Ark of the Covenant into Jerusalem in the time of David? How can that be post-exilic, since there was no Ark in post-exilic Israel? Gerstenberger's answer is that Psalm 24:7-10 may be post-exilic and yet draw on themes going back to the Israelite monarchy. And yet, Gerstenberger notes that Psalm 24 does not mention the Ark. Psalm 24 could be about God entering the Second Temple (and Gerstenberger cites Ezekiel 43-44). Or Gerstenbeger is open to Psalm 24 being about God's symbolic entry into the synagogue.