I was not primal until 3 weeks ago. So in my racing days, my eating was very clean (no fast foods, no prepared foods), and limited sugar. Typical carbs came from tuber vegetables (sweet potatoes, rice, potatoes)...lots of fish and omega oils.
When racing, I had a powerful little concoction that my 'support team' prepared for me. In a 100 miler running race, I would have one of these every 20 km:
1/3 water bottle of juice
1 cup yogourt
2 Tbsp's oil
1/3 water bottle rice beverage
A very high quality, high protein supplement.
In this particular race, I did not ingest any whole foods - went strictly with the liquid and did not experience any stomach upset, diarrhea, nor loss of mind (happens in longer races). I also take high quality salt tablets and electrolytes that I mix with water (I like to have control over increasing or decreasing mixture %, depending how my stomach is feeling/ie., if I'm absorbing the calories, or if I'm overloading which results in vomiting or diarrhea/cramping etc.
For me, the key was training with these sources, and adjust amounts/quantities based on length of race, race effort, heat conditions and how my stomach is feeling.
When racing long on a bike (Ironman, or 100-200km bike rides), I am able and my body seems to want denser foods, thus I'll eat whole foods, up to a certain point, after which I switch to all liquid nutrition. Again, I trained by eating on my bike, so my stomach became adjusted to digesting while exercising.
I've also had the extreme pleasure of pacing and crewing a friend in the Badwater Ultra Marathon where heat (50+C) was an issue. We were ingesting 1L of water every 30 minutes to stay hydrated. This is not done without proper heat training, 3 months leading up to the race.
Anyway, these are some of the strategies that worked for me. Since I have many many friends who are exceptional ultra racers, I have come to accept that we all train differently, prefer different methods of fuel, and everything is always a science project of 1 :-) I always begin with Plan A, but also have a Plan B and Plan C to default to, when/if needed. I've learned to listen carefully to the body, and always record #'s in my training manual -- this has helped me to understand the needs of my body, and how it reacts to different stimuli.