I think it is interesting to understand David's actions towards Naval in this way. It's not an accident that this story is placed directly after the scene with Saul at the cave.
1) When at the cave (Chapter 24), David refers to Saul as his father.
|יא וְאָבִי רְאֵה--גַּם רְאֵה אֶת-כְּנַף מְעִילְךָ, בְּיָדִי: כִּי בְּכָרְתִי אֶת-כְּנַף מְעִילְךָ וְלֹא הֲרַגְתִּיךָ, דַּע וּרְאֵה כִּי אֵין בְּיָדִי רָעָה וָפֶשַׁע וְלֹא-חָטָאתִי לָךְ--וְאַתָּה צֹדֶה אֶת-נַפְשִׁי, לְקַחְתָּהּ.
|11 Moreover, my father, see, yea, see the skirt of thy robe in my hand; for in that I cut off the skirt of thy robe, and killed thee not, know thou and see that there is neither evil nor transgression in my hand, and I have not sinned against thee, though thou layest wait for my soul to take it.
Saul responds and calls David his son.
|טז וַיְהִי כְּכַלּוֹת דָּוִד, לְדַבֵּר אֶת-הַדְּבָרִים הָאֵלֶּה אֶל-שָׁאוּל, וַיֹּאמֶר שָׁאוּל, הֲקֹלְךָ זֶה בְּנִי דָוִד; וַיִּשָּׂא שָׁאוּל קֹלוֹ, וַיֵּבְךְּ.
|16 And it came to pass, when David had made an end of speaking these words unto Saul, that Saul said: 'Is this thy voice, my son David?' And Saul lifted up his voice, and wept.
Similarly, in the episode with Naval, David refers to himself as Naval's son.
|ח שְׁאַל אֶת-נְעָרֶיךָ וְיַגִּידוּ לָךְ, וְיִמְצְאוּ הַנְּעָרִים חֵן בְּעֵינֶיךָ--כִּי-עַל-יוֹם טוֹב, בָּנוּ; תְּנָה-נָּא, אֵת אֲשֶׁר תִּמְצָא יָדְךָ לַעֲבָדֶיךָ, וּלְבִנְךָ, לְדָוִד.
|8 Ask thy young men, and they will tell thee; wherefore let the young men find favour in thine eyes; for we come on a good day; give, I pray thee, whatsoever cometh to thy hand, unto thy servants, and to thy son David.'
2) Saul admits that he has repaid David evil for good.
|יז וַיֹּאמֶר, אֶל-דָּוִד, צַדִּיק אַתָּה, מִמֶּנִּי: כִּי אַתָּה גְּמַלְתַּנִי הַטּוֹבָה, וַאֲנִי גְּמַלְתִּיךָ הָרָעָה.
|17 And he said to David: 'Thou art more righteous than I; for thou hast rendered unto me good, whereas I have rendered unto thee evil.
David says that Naval has repaid him evil for good.
|כא וְדָוִד אָמַר, אַךְ לַשֶּׁקֶר שָׁמַרְתִּי אֶת-כָּל-אֲשֶׁר לָזֶה בַּמִּדְבָּר, וְלֹא-נִפְקַד מִכָּל-אֲשֶׁר-לוֹ, מְאוּמָה; וַיָּשֶׁב-לִי רָעָה, תַּחַת טוֹבָה.
|21 Now David had said: 'Surely in vain have I kept all that this fellow hath in the wilderness, so that nothing was missed of all that pertained unto him; and he hath returned me evil for good.
The question that plagues readers is why David overreacts in such a way and wishes to put Naval's entire house to death. I wish to suggest that one way to understand this is that David has made himself powerless against his attacker, Saul, because he sees Saul as the Lord's annointed, mashiach Hashem. But when Naval comes along and acts towards him exactly as Saul has done, he conflates the two and his true rage against Saul and everything the king has put him through comes out against Naval. While he is powerless against Saul, he does have power over Naval.
David is put in the same situation Saul is. Saul kills the entire city of Nov (and all of the priests) because he sees them as guilty as aiding David (even though only one person, Achimelech, actually helped him). David now wants to kill all of Naval's household because he sees them as guilty as NOT aiding him (even though only one person, Naval, refuses him). In this situation, we see David's displaced rage re: Saul be redirected towards Naval, and also how shaken he is when he realizes he has been about to act like Saul and to shed innocent blood. The fact that David has the capacity to behave in this fashion sobers him up; he realizes it's not so simple to be king, after all.
This places Doeg and Avigail in opposite roles. Doeg assists Saul in committing murder; Avigail hinders it. Doeg is minister to the king and Avigail is married to a boor, but wisdom resides in Avigail, not David.