C Migration

C.6 Migrating between PostgreSQL versions

If you’re migrating between PostgreSQL versions, there are a few things to take into account.

Notes on migration from 8.3 (or earlier) to 8.4 (or later)

LedgerSMB 1.3 uses some extension modules for versions 8.3 and before for functionality that has been built into 8.4 and later. To make use of the (faster) built in version of that functionality, the following restore procedure should be used.

  1. 1.

    Migrate the database to the new function as described in section @@@ TODO

  2. 2.

    If you’re using 9.1 and up, issue the command “CREATE EXTENSION tablefunc FROM UNPACKAGED” from a psql prompt when connected to the company database

  3. 3.

    Run ’setup.pl’ from your browser to upgrade the database’s routines; this command will install routines optimized for your version of PostgreSQL

  4. 4.

    Run the command

    8.4 or 9.0

    $ psql … -f uninstall_tablefunc.sql

    9.1 and up

    “DROP EXTENSION tablefunc;” from a psql session connected to the company database

    to clean up functions and procedures in the database which are no longer used