separate postgresql launching and checking