At the end of the episode "The Husbands of River Song", River and the Doctor are on a date, at the Singing Towers of Derillium. The way River is acting, she seems to be aware that
she is nearing the end of her life, as her diary is almost full and The Doctor has kept putting off this date for a long time.
When she realizes the date will last for a while, she relaxes and start enjoying it.
To me, it seems obvious that River understands where she is in her timeline and what it means to be on this date:
That the next time she sees The Doctor will be when she dies.
But in "Silence in the Library", when she meets The Doctor for his first/her last time, she doesn't appear to have any idea what's about to happen until the very end.
Am I right in thinking Moffat has played around with the back end of River's life to fit this year's Christmas special?