GoalMove to OS-provided or custom built PostgreSQL packages instead of those supplied with H-Sphere
ResolutionH-Sphere installs to DB host(s) the following PostgreSQL packages:
postgresql-server postgresql postgresql-libs postgresql-contribYou want to install your versions of these packages and have them unaffected by H-Sphere updates.
- Things to consider before upgrade
- phpPgAdmin 4.x supports PostgreSQL versions up to 8.3.x. Support of 8.4.x versions and above is not guaranteed;
- end-user applications written for PostgreSQL 7.4.x may become unusable with later PostgreSQL versions. For additional information please refer to the vendor provided documentation at http://www.postgresql.org/docs/;
- Obtaining packages
- Save the pg_ps file (located in /var/lib/pgsql/data/global/ for Linux, /usr/local/pgsql/data/global/ for FreeBSD).
- Save the pg_hba.conf file (located in /var/lib/pgsql/data/ for Linux, /usr/local/pgsql/data/ for FreeBSD).
- Consult with the “Upgrading a PostgreSQL Cluster” section of the vendor provided manual at http://www.postgresql.org/docs/for chosen PostgreSQL version and act accordingly during the further steps.
- Prepare full backup of your PostgreSQL databases.
- Remove the H-Sphere supplied packages. To make sure the H-Sphere packages will be successfully uninstalled, uninstall them with the following option:
-f on FreeBSD
rpm -e --nodeps postgresql-server postgresql postgresql-libs postgresql-contrib
pkg_delete -f postgresql-server-7.4.29_1 postgresql-7.4.29_1 postgresql-libs-7.4.29_1 postgresql-contrib-7.4.29_1
- Install the new packages.
- Restore the backup made at step “d”.
- Set new DB special user password (postgres on Linux, pgsql on FreeBSD) using “ALTER ROLE” SQL statement;
- Replace pg_hba.conf file in the new PostgreSQL data directory with the one saved on step “b”and restart PostgreSQL server;
- Restore the pg_ps file saved on step “a” under the exact path, owner and permissions (permissions 0600, owner postgres:postgres for Linux, pgsql:pgsql for FreeBSD) where it was before, creating intermediate directories if necessary. This file contains a pair of words, first Is the special DB user login name and second is its password. Ensure that this file contains a password set during step “h”.
- Configure H-Sphere
# sh U35.0 update hspackages exclude-postgresql=add ips=192.0.2.21
- Verify configuration
sh U35.0 update hspackages ips=192.0.2.21