Re: I remember this story.
Nah, he's just a peasant. Even Luke doesn't actually _listen_ to the droid, just uses R2 as a sounding board.
R2 is literally an expy of a chinese peasant, grumbling and swearing constantly, everything he says is correct, but nobody believes him.
For an American equivalent, think a Brooklyn Cabbie kind of sidekick, circa 1930. But not the happy kind like Doiby.
It is pretty canon that R2 has never been mindwiped, but saying he knows 'everything' is a bit exaggerated. He's been present for everything important... he has all the answers, but nobody asks him the right questions. And I never said he was great at adding two and two as far as that goes. He remembers stuff, but he may not connect them together.