SuSE help


Troubleshooting: Upgrade PostgreSQL manually

The TeamForge upgrade utility upgrades PostgreSQL for you automatically when you run the prepare-environment.sh script. However, when you upgrade to TeamForge 6.1 from TeamForge 5.4, patch 1, it is possible for the automatic PostreSQL upgrade to fail. If this happens, you can do the PostgreSQL upgrade yourself.

The error, if it occurs, will look like this:
ERROR: postgres upgrade failed.
Exiting due to fatal error.
        
  1. Create a database dump.
    Note: If you have already made the dump, skip this step.
    • su - postgres -c /usr/bin/pg_dumpall > /tmp/dumppath/
  2. Upgrade PostgreSQL.
    1. Ensure that PostgreSQL is running.
      • /etc/init.d/postgresql-9.0 start
    2. Upgrade the PostgreSQL packages.
      • yum install postgresql postgresql-server postgresql-docs
    3. If you get this error:
      • %postun(postgresql-server-8.3.8-1PGDG.rhel5.x86_64) scriptlet failed, exit status 1

      then run this command:

      • yum erase postgresql-server-8.3.8-1PGDG.rhel5
  3. Move the old pgsql directory out of the way.
    • mv /var/lib/pgsql/9.0/ /var/lib/pgsql/9.0_old
  4. Rerun the prepare-environment.sh command. When it runs successfully, you can run install.sh and migrate.py.
    Important: After you run the installer and before you run the migration command, you must reload the PostgreSQL data dump:
    • su - postgres -c /usr/bin/psql < /tmp/dumppath/<name>.dmp
Related actions
Upgrade a TeamForge site to 6.1.1 on the same hardware
Upgrade to TeamForge 6.1.1 on new hardware
More information
http://www.orafaq.com/wiki/Oracle_database_Backup_and_Recovery_FAQ