Skip to content

Commit

Permalink
Adjusted calling pg_upgrade during upgrade to include LD_LIBRARY_PATH…
Browse files Browse the repository at this point in the history
… of previous installation

pg_upgrade calls postgres which includes reference to libssl that may change during upgrade which will cause postgres to not be executable
Add LD_LIBRARY_PATH=$BACKUP_DIR/lib/ to address this issue.

Ticket: ENT-11853
Changelog: title
  • Loading branch information
craigcomstock committed Jul 1, 2024
1 parent 220a455 commit e39924c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packaging/common/cfengine-hub/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ check_disk_space() {
# and then importing it into new one

migrate_db_using_pg_upgrade() {
su cfpostgres -c "$PREFIX/bin/pg_upgrade --old-bindir=$BACKUP_DIR/bin --new-bindir=$PREFIX/bin --old-datadir=$BACKUP_DIR/data --new-datadir=$PREFIX/state/pg/data"
su cfpostgres -c "LD_LIBRARY_PATH=$BACKUP_DIR/lib/ $PREFIX/bin/pg_upgrade --old-bindir=$BACKUP_DIR/bin --new-bindir=$PREFIX/bin --old-datadir=$BACKUP_DIR/data --new-datadir=$PREFIX/state/pg/data"
}

migrate_db_using_pipe() {
Expand Down

0 comments on commit e39924c

Please sign in to comment.