Skip to content

Commit

Permalink
Merge pull request #1515 from craigcomstock/ENT-12383-4/master
Browse files Browse the repository at this point in the history
Fixed problem with package upgrade not trying other migration methods if pg_upgrade fails
  • Loading branch information
craigcomstock authored Nov 18, 2024
2 parents 602a78b + 247bd16 commit 03d832a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packaging/common/cfengine-hub/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,7 @@ do_migration() {
cf_console echo "Migrating database using pg_upgrade utility..."
cf_console echo
_pg_upgrade_log="/tmp/cfengine_pg_upgrade.log"
migrate_db_using_pg_upgrade >"${_pg_upgrade_log}" 2>&1
rc=$?
if [ $rc -eq 0 ] && [ $DEBUG -lt 1 ]; then
if migrate_db_using_pg_upgrade >"${_pg_upgrade_log}" 2>&1 && [ $DEBUG -lt 1 ]; then
# Succeeded
cat "${_pg_upgrade_log}" # might as well see the details of how it worked
rm "${_pg_upgrade_log}" # clean up
Expand Down

0 comments on commit 03d832a

Please sign in to comment.