[#1337] replace postgres port in config file before restarting postgres