I recently obtained my PhD in physics from one of the Max Planck Institutes in Germany. Unfortunately, I only barely passed with a "rite" grade (the lowest passing grade here in Germany). This is despite my supervisor (and head examiner) going through my thesis with me during the writing process and giving me corrections and advice along the way which I duly implemented. Before handing the thesis in, my supervisor remarked that this was a very good thesis and will likely obtain a good mark.
However, I was told in the exam that both my thesis and oral exam had been graded poorly, even though my presentation was on time and was aimed well (according to my colleagues, director of the institute and day-to-day supervisor who was also in the room). I could not answer some questions in the oral exam simply because they were outside of my field, for example I was asked about stellar formation and ion drives despite me being an experimental physicist working on MBE (molecular-beam epitaxy) crystal growth. To add insult to injury, my supervisor said he was disappointed in me and that I should have done better, despite his previous comments.
It is also worth noting that my supervisor and I did not have the best relationship: he once said that a mistake I had made in an APS talk would "destroy my career in science" and that when I began to suffer from severe mental health problems from the stress of my thesis and a close family bereavement, he refused to let me take time off, forcing me to get a doctors note for me to take time off.
I am currently in a new postdoc position at a reputable research institution in Germany, and my new supervisors have both said that the grade does not matter since I have the position and what matters now is my publication list. But I have seen conflicting things online regarding this. What is your opinion? In your experience, does this matter at all? I would particularly like to hear from scientists.
Thank you in advance.
(P.S. It is also worth noting that I received no corrections to my thesis, which I have been told is very unusual)
(P.P.S Just to respond to some of the questions or comments given in prior answers. I am English so my original intention was to return to the UK and look for a research position, I am not interested in a Professorship. My university shows the grade on the doctoral certificate so there is no real way of hiding this at all. I have tried contacting my supervisor to ask for his logic regarding the grade he awarded me but I have so far heard nothing back.)