Silence in the Library introduced a character who was to play a significant role throughout the majority of the Steven Moffat era. This was mainly the Eleventh Doctor's story arc.
When we first met her, she was a space-going archaeologist of the 41st Century - one who seemed to know an awful lot about the Doctor, despite him having no idea who she was...
It soon became apparent that she was familiar with him in his future - and we would shortly find out what that history between them was in reverse order, as far as he was concerned. Each meeting we witnessed would see River being aware of events that hadn't yet happened for the Doctor.
Whilst we didn't know where this was leading to for the Doctor, we had seen the end of the road for her, as she sacrifices her life in Forest of the Dead before having her consciousness uploaded to the Library.
River is the personification of Moffat's "Timey-Wimey" - an childishly annoying term first heard in his Blink. In a nutshell, it's exploiting the potential of time travel as an intrinsic part of the plotting, rather than simply the means of delivering the Doctor into a story then taking him away again at the end.
For a series about a Time Traveller, Doctor Who had rarely utilised time travel effectively in a story. We had the opening instalment of The Space Museum, where the TARDIS "jumped a time-track", leading to the travellers seeing their future selves on display. This also covered the notion of alternate futures, as wat they saw could be changed.
Day of the Daleks featured a temporal paradox and another alternate future, this one seeing a successful Dalek invasion of Earth in the 22nd Century. This story introduced the Blinovitch Limitation Effect, to get round the problem of paradoxes and explain why the Doctor couldn't just pop back in time whenever anything bad happened and so change it.
We later had the Sixth Doctor building a temporal weapon - leading to the bizarre incident of a blazing android suddenly appearing out of nowhere, but explained later when we see him initiate this (the only decent thing about Timelash).
Once Moffat took over the running of the series, he tended to rapidly overuse "Timey-Wimey" - the Series 5 finale The Big Bang being the worst early example. This actually has the Doctor do exactly what the Blinovitch Limitation Effect was designed to prevent - the Doctor going back in time (multiple times) to sort out the situation. It's a total cheat for a writer. Whilst looking clever, it is actually a lazy way of resolving plot points. Things would get worse, leading to accusations that Moffat was scaring away the audience with overly-complicated plots, which seemed never to reach any resolution. Indeed, he had to turn Matt Smith's final story into a virtual info-dump just to tie up loose ends (long forgotten by the average viewer as they were three years old in some cases).
At least River's story arc wasn't overly complicated by the temporal issues. She simply met the Doctor in reverse order - so she knew where he was going next, and he knew where she was headed.
What was more convoluted was River's backstory. In order for her to have known his name, this suggested limited possibilities - one of which was that they had married. We then discovered that she was the grown up daughter of companions Amy and Rory, and that she was partly Time Lord having been conceived within the TARDIS - a thoroughly stupid idea. (The Doctor could simply recreate the Time Lord race by taking courting couples on trips, or newly weds on honeymoon vacations).
The "Doctor's wife" thing was also a nonsense, taking place in an alternate timeline.
The more we found out about River, the more the character became redundant - merely a bit of light relief. That's the problem with setting up a mystery. It's only interesting whilst it is a mystery.
Once we knew who she was and where she came from, River began to overstay her welcome as a recurring character. Once Smith moved on, it looked like the end for River, although Moffat was able to include her in one story after she had died. She did get one final outing in the Capaldi era - The Husbands of River Song.
This did allow her story to go full circle as we saw her experiencing her final meeting with the Doctor - in her timeline - before setting off for the Library...