waiting for PG to be ready