I absolutely agree with emory's answer: the earlier the better. That being said, I didn't apply for a single postdoc position until the date of my defence (I was looking at that time already, but haven't found anything interesting).
There are several factors that may differ from person to person, so make sure the advice you take fits your situation:
- some places, you actually work on your manuscript or thesis presentation until the day of your defence (e.g. France). In some places, there is a big "waiting period" between submitting the manuscript and your viva (e.g. UK)
- funding: do you have funding up until the date of your defence, or does it finish earlier?
- connections: the people you have met in conferences, through your supervisor, etc. Some people establish strong enough connections during their PhD that their postdoc search simply comes down to contacting those connections. If you have to search "blind", it could take much longer.
- location and/or immigration: A perk of looking for a postdoc in a country/locale you are familiar with is probably knowing where to look, understanding the language and familiarity with the system. A perk of looking broader is that you have more options (and a lot of places value mobility during postdoc even if you do return to your country of "PhD origin" afterwards); but depending on your nationality and target country, immigration documentation might take some non-negligible amount of time.
- finances after the viva: How easy it will be for you to get along if you have a few months of gap? Do you have enough savings (as a PhD student, likely not); is there a good social support in the country you're in (in France, I could get a very nice unemployment package for some months which allowed me to search in peace); are both you and your parents happy for you to move back in with them for a few months, etc.
So, when you start looking will depend on the above factors. I.e. if you are in a system where months leading to the defence are very work-intensive (no "waiting period"), it might simply be too stressful to look right now. That was my case: I was not sleeping regularly (in the holy trinity of work-rest-social, I opted for work+social and ignored sleep...), under a lot of stress, and my social activities were absolutely essential to keep me going. I think I would've had an easier time if somebody told me: don't feel pressure to look if you are already under too much pressure from finishing.
Some additional advice for looking for postdocs at the end of your PhD:
- if you find yourself in a pinch and have a good rapport with your supervisor, talk to them. It is not uncommon for PhD supervisors to "magick out" a short-to-mid-long postdoc for their former PhD students. My supervisor (France) was able to offer me a short 4 months contract, which gave me the "buffer time" I needed for a proper search while I was not stressed about my defence. My current lab (UK) has offered some of the PhD students a 1+ year postdoc after graduation.
- a lot of places will happily offer you a postdoc position even before you have a PhD diploma in hand (i.e. as long as you show them you have submitted your manuscript and are just waiting for the defence; in case of "waiting period" type systems), and let you take a few days off for your viva, so this should not be a limiting factor.
- almost all institutes everywhere are used to receiving applications from different academic cultures, and therefore are accustomed to different "standard" dates applying elsewhere. This is especially true for postdoc positions which typically have little to no teaching obligations.
almost all advertised postdoc positions typically have a contact e-mail for questions. If unsure about how strict the starting date or any other criteria is, asking can only help. If I was worried about whether the advertised starting date could be a problem, I might send something like:
Hi, I'm X, currently finishing my PhD on topic Y from University Z, and am very interested in applying to your open postdoc position on topic M. As I see that the advertised starting date is in September, I would like to ask if you can offer any flexibility with the starting date. The reason is that the likely date for my defence is early October, and I was wondering if you would still consider my application under these circumstances if I applied?
some applicants manage to establish a really good relation with their examiners, and I've heard of PhD students obtaining postdocs from them (with the connections established during their defence). I find it a risky option, but it is one.
- talk to your supervisor; he could have more specific advice either on where to look, when you can expect the bulk of open positions, stories form older students.