Sleep after pid file exists

Otherwise we will get "psql: FATAL:  the database system is starting up". There must be a better solution for this error