This allows, finally, proper detection when postgresql is ready to accept connections. Until now, it was possible that services depending on postgresql would fail in a race condition trying to connect to postgresql.