diff --git a/entrypoint.postgres.sh.tmpl b/entrypoint.postgres.sh.tmpl index 8289575..8260e50 100644 --- a/entrypoint.postgres.sh.tmpl +++ b/entrypoint.postgres.sh.tmpl @@ -7,7 +7,7 @@ OLDDATA=$PGDATA/old_data NEWDATA=$PGDATA/new_data if [ -e $MIGRATION_MARKER ]; then - echo "FATAL: previous migration not completed. manual restore necessary" + echo "FATAL: migration was started but did not complete in a previous run. manual recovery necessary" exit 1 fi @@ -27,7 +27,7 @@ if [ -n "$DATA_VERSION" -a "$PG_MAJOR" != "$DATA_VERSION" ]; then touch $MIGRATION_MARKER echo "running initdb" # abuse entrypoint script for initdb by making server error out - gosu postgres bash -c "export PGDATA=$NEWDATA ; /usr/local/bin/docker-entrypoint.sh --invalid-arg" + gosu postgres bash -c "export PGDATA=$NEWDATA ; /usr/local/bin/docker-entrypoint.sh --invalid-arg || true" echo "running pg_upgrade" cd /tmp gosu postgres pg_upgrade --link -b /usr/lib/postgresql/$DATA_VERSION/bin -d $OLDDATA -D $NEWDATA -U $POSTGRES_USER