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
(cherry picked from commit e39924c)
  • Loading branch information
craigcomstock committed Jul 2, 2024
1 parent 5dfe8e3 commit a290317
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 @@ -518,7 +518,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 a290317

Please sign in to comment.