Fix postgres race

This solves a race condition where bootstrap starts the controller before postgres is fully available in service discovery.