What to do when phd advisor wants me to work on side projects but i'm starting a post-doc?
I am currently in a similar position to the one you describe, except that in my case I agreed to take on a brand new side project with my previous supervisor. I spoke to my postdoc supervisor about the project as soon as I started and received his go-ahead to spend some of my time working on it. In my experience, it seemed like my postdoc supervisor thought this was totally normal and expected after a PhD.

In your position, I would agree to the rewrite (after verifying with the postdoc supervisor that this is not an issue) because it seems like it will not be too significant a time sink - you already know the work and have a reasonable estimate of how long it will take. It is always nice to publish your work. Note that you do not need to spend the first two weeks of your postdoc on it - you can allocate some time each day to it and then you will still have time to do new stuff.

I have one caveat based on my own experience which is that even if you have permission to spend some time finishing up old work, it is quite difficult to commit to doing this because it feels like you are not putting 100% into the new project. It can also be tiring to have a task that needs extra work after hours when you are trying to get established in a new place. Thus, I would limit the number of "side projects" you agree to bring along from your PhD and try to make a realistic plan for how you will finish them quickly.