I think this isn’t possible. The post_number would be recalculated if a post was split from the topic (as it’s not a post_id but the order of the posts in the topic). It could be a small action post that doesn’t look like a ‘real’ post but still counts as one (whispers would also count, but if you’re looking at running rake tasks then I’m assuming you’re an admin who can see them).
I wonder if deleting the small action post would have helped in this situation? Does this sound like it could be the issue for you @UndecidedAdmin?