Gotta admit I'm a bit confused by how she recognizes the Tenth Doctor, I suppose she knows the 'face' but not the 'order' of the Doctors, and thought that tennant was possibly a future regeneration after Smith. However that might be just a quirk of the writing since at that point I believe Tennant had not decided to leave yet, and would have done season 5 with the Angels/River story (which would've been a bit different of course).
Every indication in "Silence in the Library" is that River Song had met Ten before. She specifically recognizes that he's in the regeneration he was in when he'd only just met her ("Going by your face, I'd say it's early days for you, yes? So, crash of the
Byzantium, have we done that yet?"), and she certainly wasn't referring to his befuddled expression, considering how she refused to even consider that it meant that he hadn't yet met her at all. She has what appears to an incarnation-specific nickname for him (Pretty Boy). She's also quite certain that he won't regenerate if he tries channeling the computer at the end, though that could play either as her having met Ten again later on in his timeline, or her knowledge of Time Lord stuff allowing her to know that it'd be one of those things that just kills them right away.
The way I see it, we can either close our eyes and put our fingers in our ears and retcon that all away, coming up with all sorts of convoluted explanations for how River would initially believe that the Tenth Doctor comes between the Eleventh Doctor and the Eleventh Doctor, or we can take the far more interesting, yet also simpler, solution proposed by the episodes: Time can be rewritten.
It's a recurring phrase in all of the River Song episodes. We've actually begun seeing it happen with the cracks and most explicitly in "A Christmas Carol," where we actually see someone's life story reshape itself multiple times before our eyes. It may even be deliberate, tying into the Tenth Doctor's explosive regeneration and the manipulations of the Silence upon the TARDIS, among other things. Simply enough, in "Silence in the Library," River Song had met the Tenth Doctor at least twice before, at the
Byzantium and at Asgard, but something happened after that in his timeline, possibly the Time Lord Victorious psychotic episode, that hadn't been going to happen before, so the Doctor regenerated earlier than he had in the version of history that River lived through. Some events, like the
Byzantium, were compensated around and reshaped to incorporate the new Doctor, while others, like the picnic at Asgard, evaporated altogether (and maybe others, like the Pandorica, came into being where they hadn't been there before).
That's my take, anyway. On a related note, I was
very happy to see two-hundred-years hence Doctor had apparently begun keeping his matching diary during the hiatus, and I hope Doctor Prime starts up the habit. It ties in with one of my pet peeves about last season, that River and the Doctor weren't meeting "out of order" so much as they were meeting "backwards." Now, backwards is fine as a device, but it does make the diary kind of futile and depressing, and it'll only get more frustrating if River never develops any backstory, seen or unseen, with our Doctor. I'm really hoping that was just a side-effect of there being only three River Song stories so far, and the ordering of the episodes from her perspective will get a bit less straightforward. It would frickin' thrill me if the current episode ended up featuring a post-
Byzantium (or even just post-Pandorica) River.