Skip to content

Commit

Permalink
Fixed problem with package upgrade not trying other migration methods…
Browse files Browse the repository at this point in the history
… if pg_upgrade fails

Ticket: ENT-12383
Changelog: none
  • Loading branch information
craigcomstock committed Oct 21, 2024
1 parent 8a61122 commit 52edfbf
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 @@ -700,9 +700,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 52edfbf

Please sign in to comment.