Upgrading your PostgreSQL database
Upgrading your PostgreSQL database
The new version of Client Management requires new tablespaces; you must therefore upgrade your database as explained in the next topics.
- Upgrading the PostgreSQL database tablespaces for version 10.1 and earlier
- Upgrading the PostgreSQL database tablespaces for version 11.x
Upgrading the tablespaces of a PostgreSQL database for version 10.1 and later
If you are upgrading from version 10.1 or later to the current version you first need to upgrade your database to version 11 and then to 12 by executing the support/database/postgres/dbtablespaces_1010_1100.postgres.sql and support/database/postgres/dbtablespaces_1170_1200.postgres.sql scripts of the downloaded archive. Proceed as follows:
- Copy the files support/database/postgres/dbtablespaces_1010_1100.postgres.sql and support/database/postgres/dbtablespaces_1170_1200.postgres.sql to the temp directory of the machine on which the CM database is installed.
- Open both files in an editor.
- Replace the placeholder &1 with the path to the tablespaces subdirectory (for example, /usr/pgsql-9.2/data/facdb ) and &2 with the name of the BCM database user in both scripts.
- Launch the database tool of your choice and log on as the CM database user or administrator.
- Launch the support/database/postgres/dbtablespaces_1010_1100.postgres.sql script.
- Launch the support/database/postgres/dbtablespaces_1170_1200.postgres.sql script.
The tablespaces are now upgraded and you can continue with the master server upgrade.
Upgrading the tablespaces of a PostgreSQL database for version 11.1 and later
If you are upgrading your master from version 11.1 or later to the current version, you first need to upgrade your database by executing the support/database/postgres/dbtablespaces_1170_1200.postgres.sql script of the downloaded archive. Proceed as follows:
- Copy the file support/database/postgres/dbtablespaces_1170_1200.postgres.sql to the temp directory of the machine on which the CM database is installed.
- Open the script in an editor.
- Replace the placeholder &1 with the path to the tablespaces subdirectory (for example, /usr/pgsql-9.2/data/facdb ) and &2 with the name of the BCM database user.
- Launch the database tool of your choice, log on as the CM database user or administrator.
- Launch the support/database/postgres/dbtablespaces_1170_1200.postgres.sql script.
The tablespaces are now upgraded and you can continue with the master server upgrade.