wait for pg to startup