Suppose one has been hired for a three-year postdoc. Three years give sufficient opportunity to get some work done, without moving to a new country every year. Possibly, an opportunity might arise to move to something permanent before the three years are finished (either in academia, or in industry, or in government research labs, or somewhere on the edge of those). However, the postdoc supervisor, who has invested time and money in a postdoc in order to get a project done, might be disappointed if the postdoc leaves a job unfinished.
On one extreme, I know someone who has been a postdoc at the current place for 5½ years, and they were a postdoc somewhere else before that. I suppose spending 8 years in postdocs does not help when applying for permanent positions. On the other hand, I know someone who has been a postdoc for only seven months or so, and is already applying for a primarily teaching position at a somewhat lesser known university, possibly a position where major post-PhD results are not essential.
What is the minimum one should spend in a postdoc, before even starting to consider applying for possibly permanent positions? I mean this question broadly; an answer may either be expressed in time (one year) or in results (one major and one minor first-author paper). Of course, without any significant results, finding a faculty position at a major place will be hard if not impossible. But the question here is related to the moral obligation to complete some of the task one has been hired to do.