postgresql-maven-plugin icon indicating copy to clipboard operation
postgresql-maven-plugin copied to clipboard

Preventing StartMojo hangs on abnormal termination of postgres process.

Open lukasz-kusek opened this issue 11 years ago • 0 comments

In case postgres process [/target/pgsql/bin/postgres, -D, /target/data] terminates abnormally during startup (postgres cannot access the server configuration file "/target/data/postgresql.conf": No such file or directory) StartMojo falls into infinite loop and prints nothing.

[INFO] Starting PostgreSQL
while (!started()) {
    Thread.sleep(1000L);
}

In this merge request I have added checking if process is alive and throwing an exception in case it isn't

lukasz-kusek avatar Feb 19 '15 12:02 lukasz-kusek