Over at Highly Allochthonous Dr. Rowan asks a question on the minds of many/most post-doctoral researchers. "How long do I have to do this before I can get a real fucking job?" I posted a rather long rambling answer to this there, but thought I would expand on it here a bit, because it is always timely.
By way of full disclosure, I did one post-doc before getting a faculty position. I also know of and have known dozens of post-docs over my career as an undergrad through the present. However, most of my thoughts originate from my direct experiences as a post-doc. Thus, these will not apply to everyone.
First, when you are completing graduate school and thinking about post-docs, think beyond the post-doc. Where do you want to end up? Do you want to be a research scientist at a tier one research institution or do you want to teach science at a small liberal arts college? Do you want to go into industry? Science writing? The possibilities are endless. However, if you don't have an idea of what you want to do in the long term, stop reading and go figure that out first. By the way, you can take some time after graduate school to figure it out, maybe doing a temporary post-doc in your thesis advisor's lab or a related lab nearby (however, I do not recommend this for more than a few months as the best course of action).
Ok, you know what you want to do. Now you need to find a post-doctoral mentor that can help you reach that goal.
If you want to go primarily into teaching, why would you go to a high powered lab with 5 other post-docs who are at least partially competing with each other to get the next Science/Nature/Cell paper? Not that you couldn't do well there, but what you really need, in addition to research and pubs, is some teaching experience. So find a post-doctoral mentor that will accommodate you being out of the lab to teach a section of undergraduates or a class at a community college. Also, just because you are primarily interested in teaching undergraduates, you may want to, or have to, continue doing some research. How about doing a post-doc in a bacterial or fungal lab? These organisms tend to be easy to handle in a small college setting. The supplies to grow and study them are fairly inexpensive and its possible to get a lot of data in a short time by asking the right questions using undergraduates. Remember you will not be doing this research much yourself, you'll be teaching 2-3 classes a semester. But think of the excitement and passion for science you can generate in your undergraduates by giving them readily doable (and publishable) projects!
If you want to go primarily into research (this is my track), then you need to be thinking about the research program you will have as a future PI. Here's a question you must ask when you interview with a potential mentor, "What aspects of the work I do can I take with me for my own lab?" If you don't ask that question in some clear way, you are a fucking moron. You might get lucky regardless, but morons sometimes do. You are striving to establish your own career, while working in someone's lab who is trying to maintain their own career, so this isn't trivial. The answer might be, anything done here, stays here. Isn't it better to know you will likely be directly competing with an established funded filled to capacity lab before you even unpack at your new position? If the answer is like this, find another post-doc with a different answer or plan on doing a second post-doc. You may get an "I expect you to work on this for me, but you can also establish your own projects to take with you." or "Whatever you want to take, take." answer. The permutations are endless, but you need this information! Also, talk to the current and former members of the lab, has the mentor scooped a trainee trying to start their own lab in the past? Its not common but it happens (regardless of the answers given above). Remember at the end of the day when an unpleasant surprise greets you, no one in your department, at NIH NSF or the DOE, on the tenure committee is going to give two shits about your "Its not fair!" approach. Its not fair, its sucks, and while I dont like to blame the victim, in most cases I've seen, its due to the victim not doing their homework or blatantly ignoring all the warnings.
Alrighty, you've got the perfect post-doc! How do you know when its done? My advice is be thinking about jobs from day 1, because success in getting a job is due to luck as much as skill. What you need to do is try your best to stack the deck in your favor. You will need publications, a strong rapport with your mentor, and contacts outside your current research center (independent funding is also a gigantic plus (a training grant/NRSA is not gigantic since these are primarily given to the mentor)). To be marketable for the research track, you will need at least 3 publications within 2-3 years, more is better and it can easily take a little longer depending on your field. Regardless, now is not the time to be dappling with 4 different projects. Also, to quote myself, publication quality matters more than quantity, but D'uh. Impact (not impact factor) is important, though often overlooked. If you are publishing high quality papers that are essentially in the "more of the same" variety this does not have as much impact as a paper establishing a new approach to study a problem, a new way of thinking about a problem, etc. If you are doing what everyone else is doing (albeit in your specific area) you can not set yourself apart from your competitors. BTW dont kid yourself, it is a competition and you generally don't get to see the competition in action. Obviously you want a strong rapport with your mentor, if you don't have that consider yourself terminally fucked (shouting matches with your mentor can often be an indication of a strong rapport). Finally, outside contacts to write you letters of reference is a great way to set yourself apart. If you can, skip your thesis advisor, its like asking a parent for a letter. Getting your mentor and 2-3 top researchers at top research centers to write letters is like gold. When you go up for tenure (if you are in a tenure-track position), you need outside letters and everyone knows it. If you can show the hiring committees that you are already establishing yourself, you've gained several strides on your competition. Finally, obtaining a post-doc to PI transition award is essentially a free pass to a faculty position (but these are not trivial to get and you shouldn't count on them).
Ok, you have interesting and important pubs, your god-like mentor adores you and departmental chairs across the nation are emailing you for help, now what? Pray and pray often, and dont be choosy about the deities you pray to. This is where it becomes a crap shoot. Again plagiarizing myself the issue is the job market and how your research area/skills fit into the job market. When you apply and go on the job search you need to leave the committees with an idea about what you will bring to the institution. Your specific research area will get you in the door, but how you approach science and think about things will get you an offer. What you cannot control is what research areas will be in demand (actually you can usually determine if an area will likely not be in demand, which can help).
As I said there is a ton of luck involved, although to a large extent you can stack the deck in your favor. I got a faculty position after 2.5 years of post-doc. This was not the norm nor am I some super-star, primarily this was being in the right place at the right time (this is the luck component and why I only got a few interviews). However, I also had a bigger view about my research area than the specific niche I was immersed in or at least I think I did and the projects I was involved with had broad ramifications (the stacking the deck component and why I got offers from every place I interviewed).
So, to all those soon-to-be and current post-docs out there take my opinions with a five pound tablet of salt along with this heart-felt "Good Luck!"