We've all heard "Write what you know." I would reverse that and say, "Know what you write."
Many fine men and women have devoted their lives and careers to researching and publishing historical reference material. We owe them our respect, and, as writers of historical fiction, we owe it to ourselves, and our readers to make our stories as accurate as possible. I do not think writers claiming to write historical fiction should ever scramble recorded history to suit a story.
Does this mean that we cannot adjust the facts to suit our plot? Well, yes -- and no. Most historical novelists have toyed with history for the sake of plot movement. However, the best of us do not do it without considerable thought.
One way to avoid problems with historical events and personages is to write 'between' the facts. Say, for instance, that information about the beginning and the outcome of an event is readily available, but your extensive research turns up nothing about the middle. Does that mean you can do whatever you want with the middle? Pretty much. Just don't kill off anyone known to have been around for the end.
Sometimes all you want is the flavor of an historical era. That is, in its way, harder to deal with than events. For example, how do people care for their clothes? How do they cook their food? How do they handle things like sanitation, disease, birth control, and a thousand other minute details of everyday life? You won't need to put all of this information in your manuscript but you need to know it. You don't want to have a character using something before it was invented.
For FIXIN' THINGS, I needed to know if flat irons existed in the 19th century. My research of the 18th century proved their existence in that era. Therefore, it's a pretty good bet that my female lead will have one around in the 19th. Of course, setting a novel in 19th century America makes for easy research. So much information is available that knowing when to stop researching and start writing becomes difficult.
So, when is it time to do it? That, too, has a bifurcated answer. NOW is a good time to start writing the novel, whenever now is, and NEVER is the perfect time to stop researching. I find myself doing additional spot research through multiple rewrites. And, everything I change must be checked for accuracy.
What if your story wants to happen in an unreported era? Then, it becomes essential to research previous times. My novel, SAPPHO SINGS, is set during Greece's dark period. While most of us are at least vaguely familiar with Athens and Sparta in the 4th Century B.C.E., and Homer showed us much of the 10th century B.C.E. but little or nothing has come down to us from the time between. What there was has been systematically destroyed by religious interests. Therefore, in order to make my story as accurate as conscience dictates, I studied what went before. Homer was a starting point. To that I added the Bible, the Quaran and all the histories of Egypt and Mesopotamia I could get my hands on in those pre-Internet years.
I believe it behooves us, as writers of historical fiction, to spend the time and effort necessary to check and recheck any and all material we use from the past.
-- or --
leave history strictly alone and write our fictions without the help of research and researchers. We cannot, in all fairness, slough it off. We cannot shrug and say, "It is such a small part of the novel, it doesn't matter." History matters, a lot, to your readers, or they wouldn't be reading your historical novel.
If you have good reason to believe that the situation you want to put a character in could not have happened in the time and place you wish it to, it is you and your character who must adjust--history cannot.