Skip to content

Commit

Permalink
Upgrade fails from 18.1.3 to 19.1.1 with postgresql error on Open SUSE
Browse files Browse the repository at this point in the history
  • Loading branch information
nithinj committed Jan 21, 2019
1 parent 54f497e commit 3009492
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cmds/scripts/pbs_habitat.in
Expand Up @@ -221,8 +221,10 @@ upgrade_pbs_database() {
return 1
fi

sys_pgsql_ver=$(echo `${PGSQL_DIR}/bin/psql -V` | awk 'NR==1 {print $NF}' | cut -d '.' -f 1,2)
sys_pgsql_ver=$(echo `${PGSQL_BIN}/postgres -V` | awk 'NR==1 {print $NF}' | cut -d '.' -f 1,2)
old_pgsql_ver=`cat ${data_dir}/PG_VERSION`
# strip the minor version from sys_pgsql_ver if old_pgsql_ver does not have minor version (for comparison).
[[ ! $old_pgsql_ver =~ "." ]] && sys_pgsql_ver=$(echo $sys_pgsql_ver | cut -d '.' -f 1)

[ ${sys_pgsql_ver%.*} -eq ${old_pgsql_ver%.*} ] && [ ${sys_pgsql_ver#*.} \> ${old_pgsql_ver#*.} ] || [ ${sys_pgsql_ver%.*} -gt ${old_pgsql_ver%.*} ];
result=$?
Expand Down

0 comments on commit 3009492

Please sign in to comment.