I think one of the things one must train oneself for, is the ability to critically judge a project for its do-ability or its imminent doom. While in grad school, you have 5 -6 years to work things out.. projects often take a different route than what was proposed and you go along the newly carved route. The presence of a committee, annual committee meetings, etc. ensure that you are not getting lost down a path of no return. Post-doc life is different: mostly because you are no longer in the grad school "relaxed" pace or time frame, and also because you are much more responsible for your own progress or lack thereof. Your post-doc advisor assumes and entrusts you with the responsibility that comes with the Ph.D, and you are pretty much on your own.
There is no big secret to this ability to differentiate a doomed project from a truly attainable and realistic goal. It basically involves very very thorough reading of the literature (aim for breadth, rather than depth), striving to stay up to speed on current work (possible competitors, collaborators, ones that tried it and failed etc.) and then the ability to assimilate all the varied reading and posit your question/hypothesis/goals in this context. You must not only be able to evaluate factual loopholes in the science of what you aim to do, but also technical loopholes that will point to how difficult/easy/doable what you're planning to do is. We are all familiar with the breed of advisors that say "Just stick it in front of hfg (his favourite gene) and see what happens", really giving little thought to all the grunt work that goes behind "Sticking it in front of hfg".
It also really helps to discuss the project with labmates who've been around in the lab longer than you, and hence are aware of the limitations of the system and can give you good advice about feasibility. They can also warn you about potential potholes that are the "Boss's pet theory" zone.
Only when you have done a very good job with your homework, will the next step come easy. That is, having the confidence to stand up for yourself and tell your P.I that you don't think sticking it in front of hfg is such a good idea because of a. b and c. As long as you tell yourself that you are new to the field, don't understand too well what's going on, you are setting yourself up for several exploratory experiences. Which may be fun, which may be a good learning experience, but will not be the most optimum use of your time. When you present a well researched case to your adivsor, instead, sometimes, you may be able to argue your way out. Sometimes you may not. In that case, at least you will be prepared for what you're up against. So it always helps to do your homework well.
This is also why it is advised to write up a proposal early on in your post-doc and submit it to a funding agency. Whether or not you get the grant, you will have gone through the process of critically evaluating your own hypothesis/aims and might also be lucky to get an outside perspective.
The sooner you realise that you are stuck in a dead-end project (or one that the P.I just wants you to work out because its his pet theory and he was unable to find a bakra to buy it) the better. Whenever you discover it, you work towards cutting your losses. Hopefully, you have another "side project" and you begin investing more time in that one, or else you come up with an alternative hypothesis and start working on it. Oftentimes "failed" experiments tell you another story, and that story might serve as a new avenue. The key here is to keep your eyes and ears open, be able to detect signs early on and make a switch as soon as you can. And remind yourself that you are no longer in grad school. :)