I've been through this twice

You can keep it in as long as the skin around it isn't getting shallower. It's best to remove it yourself (if you want to salvage it for post-baby) before the skin stretches and it grows out. If you get pretty big, it'll just stretch the skin until it pushes itself through the last layer of skin. If you take it out before you get too close to that...you should be able to salvage the piercing without having to have it re-pierced after the baby is born.