Neatened waiting for postgres client