Postdoctoral length before landing a professorship job?
Speaking for Germany: in former times, a "Habilitation" war required for a full professorship - which you usually wrote during your post-doc phase. It usually took about 6 years (of course with strong variations). Now, you can qualify for a full professorship by being a "Junior Professor" - which takes 6 years with an interim evaluation after three years. In some cases, junior-professorships can be transformed to full professorships after six years, but if this really happens depends strongly on your university and faculty (in fact politics says it should be the norm, but in fact universities are having much more junior professorships than full professorships).
So the general norm in Germany is 6years+, since you usually won't get a position right after your PhD.
The range of scenarios I have seen (mostly in the US) for “postdoctoral length before landing a professorship job” is 0-8 years, with anywhere between 3 and 5 years being fairly typical. This should be understood with the following caveats:
Some people actually enjoy doing several postdocs, or preferred prolonging their postdoc to get a really good professorship (or to achieve some other goal) when they had an option of taking a less good one earlier. You should not assume that someone taking 6 or 8 years means something terrible (but you should also not assume that it means something wonderful; basically you just shouldn’t make assumptions about what it means).
Some people do longer postdocs because they switched fields part way through their postdocs.
Not all jobs fall neatly on the postdoc/professorship spectrum. E.g., there are research labs (both government and industry) or other jobs from which a postdoc might transition to, and from which one might realistically transition to a professorship at some point.
The bottom line is that both statistics and anecdotal data can be very misleading. Each case tells a unique story which may, or quite possibly may not, have any relevance to your own situation.
Another thought about what you wrote:
So, my plan is to fix a deadline time to do my best, and if I don't get a professorship by that time, I should start, without a question, to seek for a job at the industry.
The natural question arises, which is this optimal stopping time? According to my advisor, I should land a professorship in 3 years, but I'm not sure if this is true.
While it’s certainly good to make plans, no offense but I think fixing a deadline in advance is not a good plan. The true “optimal stopping strategy” would include being open to adjusting your plan dynamically to fit circumstances. E.g., if you are doing great work and for random reasons just didn’t manage to get a tenure track position by year X, or if some really cool opportunity came up to go to some prestigious place for a year, it might make sense to do another year as a postdoc even if you hadn’t originally planned to. By contrast, if after 1-2 years you have not produced any research (I’m sure that won’t happen, it’s just a hypothetical scenario), it might be better to leave early rather than wait out the allotted 3-year postdoc period.
Good luck!
As the poster mentioned that answer for other fields and regions might be useful:
In the English speaking biology/biomedical world, a really good researcher will do one 3 year postdoc, followed by a 3-5 year independent or semi-independent fellowship before beginning to look for permanent positions.
Also normal would be to have worked in a 1-3 postdocs totaling around 10 years in total. After 3 postdocs or more than 10 years people will start to ask questions.