Skip to content

Commit

Permalink
Print logs if failure to migrate postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed Oct 22, 2021
1 parent ece369f commit 1076b27
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Postgres/13.4/migrate-docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ if [[ "$CURRENT_PGVERSION" != "$EXPECTED_PGVERSION" ]] && \
fi
fi

gosu postgres pg_upgrade
if ! gosu postgres pg_upgrade; then
echo "Failed to upgrade the server"
cat pg_upgrade_server.log
exit 1
fi

rm $PGDATANEW/*.conf
mv $PGDATANEW/* "$PGDATABASE"
mv $PGDATAOLD/*.conf "$PGDATABASE"
Expand Down

0 comments on commit 1076b27

Please sign in to comment.