How related should be the postdoc subject to my PhD topic?
Your postdoc gives you an opportunity to demonstrate two key traits of successful researchers: independence and flexibility. Both of these traits are essential for succeeding in any tenure-track faculty position. Consequently, building a reputation for these traits is essential for being hired into a tenure-track faculty position. Faculty hiring committees look for people who will succeed on their own, and who will remain successful over several decades as the field evolves around them.
Independence
Right now your research reputation is deeply entangled with your advisor's. The research community knows your advisor better than they know you. If you've never published without your advisor, the community has no direct evidence of your research abilities. Even if you did most of the work, and even if your advisor tells everyone that you did most of the work, the community will give your advisor more credit than you. After all, your advisor's opinion isn't exactly unbiased; they have a vested interest in making you look good.
The only way to build an independent research reputation is to publish independently. At a minimum, this means publishing strong papers without your advisor. Even better is to write strong papers with new ideas/techniques that can't be traced back to your advisor. Solo followup papers on joint work with your advisor are good, but some people will still think the key ideas are your advisor's, and you're just cleaning up the low-hanging fruit. Better to strike out completely on your own.
Flexibility
Most PhD theses focus on a narrow collection of closely related problems, which are solved using similar ideas/tools/techniques. No matter how strong your thesis results are, if you've only ever done one "thing", then people will wonder if that's all you can do. So if all your research has been on reinforcement learning of human motion for animation synthesis from Kinect data, the research community will think of you as someone who works on reinforcement learning of human motion for animation synthesis from Kinect data. But what you want is for people to think of you as an expert in reinforcement learning, or an expert in animation synthesis -- or even better, an expert in machine learning more generally.
The only way to develop a reputation for broader expertise is to demonstrate broader expertise. That doesn't mean you have to suddenly switch to a completely different field — you do want to exploit the expertise you already have. But something significant needs to change—for example, statistics instead of reinforcement, or animals instead of humans, or robot motion planning instead of animation synthesis, or YouTube videos instead of Kinect data, or all of the above—that requires you to develop new ideas and new techniques.
If you want to grow your skills professionally, you should postdoc in an area which is complementary to but different than your current expertise. If you want a faculty position you should find the 1 or 2 people in your exact field who have a current track-record of placing people into faculty positions and then try to postdoc for that person.
Finishing my PhD I chose my postdoc group by looking at what skills I wanted to add and what areas were interesting in my very broad field. Therefore I joined a large group led by an ambitious Assistant Professor. The research program on the PI's website were exactly(!) the focus areas and skillsets I wanted to learn. My time in this group was extremely productive. I was given the chance to learn entirely new fields and go after problems of my own selection. I was able to mentor several graduate students and undergraduate students and design projects for them that led to coauthorships and patents for me independent of my own hands-on contributions. My boss never sat on a manuscript I gave him for any longer than a month before clearing it for submission. In total I authored or coauthored roughly 21 peer-reviewed manuscripts from this 4-year era and I received two internationally competitive awards for my research. This part was really great!
The bad part was my ambitious boss was also selfish and a little insecure. After receiving tenure his focus went towards marshaling support for winning every conceivable young investigator award out there. I was always pushed to go for low-hanging-fruit projects that would place well in midrange journals at the expense of investing time in deep skillset learning or high-impact projects. He was not supportive of me or the other postdoc finding a faculty job, because advocating for us would take away capital he needed to win personal awards. He wanted to look over my faculty application not to provide constructive input but ensure that no ideas that were generated from my current research were in the application. Therefore the research Ideas I proposed were far enough outside my core research expertise and demonstrated accomplishments that hiring committees could easily dismiss them. The places I obtained interviews based on my own merits were extremely deficient in the opportunity and support they could offer me. Those places, with their poor resources were especially turned off that I channeled my bosses' ambitious attitude. I proudly stated I hoped to grow a group larger-than-average there, and also hoped to be in a position to win young investigator awards around the time I received tenure. At the end of this failed cycle I felt very professionally empty. Was all the nights and weekends I put in to make my ideas work just to enhance my bosses' career at zero benefit to my own? My boss said I should continue working for him for 45k because with just 5 more publications or so in the next year I would be a shoo-in for a top position. I decided that was really self-serving for his own ambitions and left as soon as I could.
At this point I also had enough self-awareness in the field to see that all the good positions where startup packages and institutional support were what I desired were predominately going to people from the exact same groups. The way a good department typically does hiring is they look at what area they want to hire in and then directly contact the 1 or 2 high-status professors and ask whether they have any postdocs or students in their group looking for a position. Those candidates may have been a lot less productive than me, but they had the "right pedigree" and a tightly focused publication record and a research outlook that extended nicely from distinguished leaders of the field. This profile is 10X more appealing to hiring committees than someone who has emerged from a nobody-group with a large pile of scattershot papers.
So if I could go back in time, I don't know if I would change my mind and make the more cynical, careerist decision. If I did I would probably have a position I really liked. But I would also be a much more limited, uncreative investigator. I do wish I had a mentor at the end of my PhD that could explain the ends and outs of the consequences of these decisions. Basically my defense committee just said that I should go for a faculty position without practical advice on the sort of games I should play to make that possible.
What you do is really up to you. I will also add that the options your adviser pushes you may or may not be in your best interests. They may be looking to "place" you somewhere that helps themselves out. You should have a good idea of where you see your ambitions taking you by now.