Search Engine: Elastic

Article ID: 114896, created on Oct 4, 2012, last review on May 2, 2014

  • Applies to:
  • H-Sphere


Move to OS-provided or custom built PostgreSQL packages instead of those supplied with H-Sphere


H-Sphere installs to DB host(s) the following PostgreSQL packages:
You want to install your versions of these packages and have them unaffected by H-Sphere updates.
  1. 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;
  1. Obtaining packages
You can get binary PostgreSQL packages from either official site use those provided by your operating system vendor (e.g. via ‘yum’). For additional information please refer to the vendor download page at
  1. Reinstall
Uninstall the corresponding H-Sphere packages from the system and then install the new ones.
  1. Save the pg_ps file (located  in /var/lib/pgsql/data/global/ for Linux, /usr/local/pgsql/data/global/ for FreeBSD).
  2. Save the pg_hba.conf file (located in /var/lib/pgsql/data/ for Linux, /usr/local/pgsql/data/ for FreeBSD).
  3. Consult with the “Upgrading a PostgreSQL Cluster” section of the vendor provided manual at chosen PostgreSQL version and act accordingly during the further steps.
  4. Prepare full backup of your PostgreSQL databases.
  5. Remove the H-Sphere supplied packages. To make sure the H-Sphere packages will be successfully uninstalled, uninstall them with the following option:
      --nodeps on RHEL
      -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
  1. Install the new packages.
  2. Restore the backup made at step “d”.
  3. Set new DB special user password (postgres on Linux, pgsql on FreeBSD) using “ALTER ROLE” SQL statement;
  4. Replace pg_hba.conf file in the new PostgreSQL data directory with the one saved on step “b”and restart PostgreSQL server;
  5. 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”.
  1. Configure H-Sphere
Configure H-Sphere to ignore these packages during the further updates. This is done with the installer/updater's exclude-postgresql=add option, e.g.:
# sh U35.0 update hspackages exclude-postgresql=add ips=
  1. Verify configuration
You can immediately check that H-Sphere does not remove or update your new PostgreSQL packages by running the update, e.g.:
sh U35.0 update hspackages ips=


f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF