@Glenn ***
you'll need to buy a re-entry permit before leaving.
But more importantly is if your country makes your old passport invalid when you renew. If that's the case you won't be able to re-enter because your visa/extension will be invalid because it's in an invalid passport.