Upgrade the PostgreSQL Database

When you use the PostgreSQL Database, the APM Installer upgrades the database to PostgreSQL version 9.6.2. Ensure that your environment supports PostgreSQL 9.6.2.Example:The current version does not support Red Hat 5.x. You must use or upgrade to Red Hat version 6.x or 7.x to support PostgreSQL 9.6.2.
apmdevops106
When you use the PostgreSQL Database, the APM Installer upgrades the database to PostgreSQL version 9.6.2. Ensure that your environment supports PostgreSQL 9.6.2.
Example:
The current version does not support Red Hat 5.x. You must use or upgrade to Red Hat version 6.x or 7.x to support PostgreSQL 9.6.2.
Ensure that you review the requirements in the compatibility matrix before you initiate an upgrade. For more information, see Support and Compatibility.
Depending on the hosted platform and CA APM release from which you upgrade, the PostgreSQL Database upgrade works differently:
  • Yes
    :
    Represents that you provide the new PostgreSQL instance location. After successful upgrade, uninstall the old PostgreSQL Database.
  • No
    :
    Represents that you upgrade the existing PostgreSQL instance to the new one by replacing the existing database binaries.
    APM 9.7.x
    APM 10.x
    Windows
    yes
    yes
    Linux
    yes
    yes
    Solaris
    yes
    yes
We recommend that you have only one database schema within a PostgreSQL instance. If multiple database schemas exist within an instance, then all the databases are migrated to the new PostgreSQL instance during the upgrade. The existing instance is uninstalled without affecting the data folder and the specific database schema is upgraded.
Multiple PostgreSQL versions sharing major release versions, such as 9.2 and 9.2.15 or 9.2.4, cannot coexist. If detected, the existing PostgreSQL instance is automatically upgraded. Do not use the
Install Database
option during CA APM upgrade if you have a PostgreSQL instance that is installed with CA APM 9.7.x or later versions.
Verify Prerequisites for PostgreSQL Upgrade
Before you upgrade the PostgreSQL Database, verify the following information:
  • The computer meets or exceeds the system requirements for the current version of the PostgreSQL Database.
  • The PostgreSQL Server is running.
  • Disk space of at least 1.5 times the size of the PostgreSQL Database is available.
  • All APM services and components are shut down.
  • No APM files or folders are in use by any running process.
  • PostgreSQL Database is up and running.
  • No process or user is connected to the database.
  • (Solaris 10 only) The
    libreadline6
    package is installed.
  • The PostgreSQL instance to be upgraded was previously installed with the APM Installer.
Upgrade the PostgreSQL Database
Upgrade the PostgreSQL Database using the GUI, Console, or silent mode.
Upgrade Using GUI and Console Mode.
The procedure to upgrade the PostgreSQL Database using either the GUI or Console modes are the same. In GUI mode, select options through the interface, and in Console mode press
Enter
to proceed to the next step.
Follow these steps:
  1. Locate and launch the appropriate Installer for your environment. For more information, see Launch the Installer.
    The
    Introduction
    screen opens.
  2. Click
    Next
    or press
    Enter
    to continue.
    The
    CA End User License Agreement
    (EULA)
    screen displays.
  3. Accept the
    EULA
    , and click
    Next
    or press
    Enter
    to continue.
    The
    Choose Install Set
    screen displays.
  4. Click
    Database Only
    in the
    Choose Install Set
    screen.
  5. In the
    Choose Install Folder
    , specify the directory to install the database scripts, and click
    Next
    or press
    Enter
    to continue.
    Do not specify the existing database directory. The database directory contains the install logs and database scripts. Specify the installation path and directory using ASCII characters only. Non-ASCII characters, such as Japanese, are not supported for PostgreSQL installation.
    Default Installation Path:
    • (Windows):
      <C:\\Program Files\\CA APM\\Introscope<version>>
    • (UNIX): <
      /root/Introscope<version>>
      The
      Choose APM Database
      screen displays.
  6. Select
    PostgreSQL
    and click
    Next
    or press
    Enter
    to continue.
    The
    Install or Choose Existing APM Database
    screen displays.
  7. Select the
    Upgrade Database Schema
    or Create New Database Schema
    option, and click
    Next
    or press
    Enter
    to continue.
    The
    APM Database Administration Settings
    screen displays.
  8. Provide the following
    PostgreSQL Administration Settings
    information, and click
    Next
    or press
    Enter
    to continue:
    1. Database Port (Default: 5432):
      Port at which the existing database server is running.
      Default:
      5432
    2. (Windows only)
      PostgreSQL Administrator Username:
      Username of the running database server superuser.
      Default:
      postgres
    3. PostgreSQL Administrator Password:
      Password of the running database server superuser.
      The PostgreSQL Administrator password must be identical to the password of the pre-upgrade PostgreSQL Database administrator user.
    4. Confirm Password:
      Confirm the password.
      The
      PostgreSQL upgrade is required in order to upgrade to the latest APM database
      screen displays.
  9. Specify
    Upgrade PostgreSQL and APM Database
    , and click
    Next
    or press
    Enter
    to continue.
    This step appears only when old and new
    PostgreSQL
    are of different major version.
    Example:
    PostgreSQL 9.2 to PostgreSQL 9.6
    This screen does appear when you upgrade
    PostgreSQL
    within the same major version.
    Example:
    PostgreSQL 9.2.4 to PostgreSQL 9.2.9
    The
    APM Database
    screen displays.
  10. Specify the following
    APM Database
    information, and click
    Next
    or press
    Enter
    to continue.
    • Database Name:
      Specifies the name of the APM database schema.
      Default:
      cemdb
      (database schema name)
      If you upgrade a database schema, use the name of the database schema that you are upgrading.
    • Database Username:
      Specifies the database username that you want associated with the APM database schema. The database username cannot contain uppercase or special characters.
      Default:
      admin
    • Database
      Password:
      Specifies the password for the database user that is associated with the APM database schema.
      The APM database password must be identical to the password of the pre-upgrade APM database schema.
    • Confirm Password:
      Confirm the password that you entered previously.
      The Enter upgraded PostgreSQL Install Directory screen displays.
  11. Specify the directory to install PostgreSQL-9.6.2, and click
    Next
    or press
    Enter
    to continue.
    Default:
    </opt/PostgreSQL<version>>
    (Linux only) If you change the database installation directory, do not place it under the /root directory. If you do so, PostgreSQL installs but fails to start. PostgreSQL limits the installation location from the /root directory.
    The
    Database Pre-Installation Summary
    screen displays.
  12. Review the settings that you specified for the PostgreSQL database, and click
    Next
    or press
    Enter
    to continue.
  13. On the
    Enable Backup
    screen, the
    Enable Backup
    option is selected by default. Leave the default selection and click
    Next
    or press
    Enter
    to continue.
    The Installer backs up the existing instance of the PostgreSQL Database before starting the upgrade. A summary screen displays. For more information about backup and rollback, see Upgrade the Enterprise Manager and Backup and Rollback During CA APM Upgrade.
    The
    Beginning Backup of Your Installation
    screen displays.
  14. Click
    Next
    or press
    Enter
    to continue.
    The installer backs up and upgrades the necessary files.
  15. Click
    Done
    or press
    Enter
    to Exit the Installer when the upgrade is complete.
  16. (Optional) If you encounter issues, review the schema and installation log files.
    Default log directories:
    • (Linux/Solaris):
      /root/Introscope
      <version>\install\schematools.log
    • (Linux/Solaris):
      /root/Introscope10.7.0.45/install/Introscope_<version>_InstallLog.log
    • (Windows):
      C:\Program Files\CA APM\Introscope<version>\install\schematools.log
    • (Windows):
      C:\Program Files\CA APM\Introscope<version>\install\Introscope_<version>_InstallLog.log
Upgrade in Silent Mode
To perform the PostgreSQL upgrade in silent mode, update several properties in the
SampleResponseFile.Introscope.txt
file. The download package contains the file and EULA files.
For information about the properties, EULA files, and running the Installer from command line, see Launch the Installer.
Follow these steps:
  1. Go to the
    SampleResponseFile.Introscope.txt
    file.
  2. Review the Help Instructions.
  3. Go to the
    APM Database Settings
    section, and update the following properties according to the needs of your installation:
    chosenDatabaseIsPostgres=true chosenDatabaseIsOracle=false dbHost=127.0.0.1 dbPort=<PostgreSQL port> dbName=<apm database name> dbUser=<apm database user> dbPassword=<apm database user password > dbAdminUser= <PostgreSQL service user> dbAdminPassword=<PostgreSQL Service password> validateDatabase=true (uncomment) upgradeSchema=true (uncomment) databaseDir= $defaultDatabaseDir$ newPgInstallDir= $defaultDatabaseDir$ (Windows only PostgreSQL DB installation) dbInstallScriptTimeoutInMillis=<milliseconds> validateDatabase=<true or false> upgradeSchema=<true>
    The following table shows how the
    validateDatabase
    and
    upgradeschema
    properties control the behavior of database installation and upgrade.
    validateDatabase
    upgradeSchema
    Action
    false
    false
    Fresh Installation of PostgreSQL
    true
    false
    Create the database if it does not exist
    true
    true
    Upgrade the existing database schema
  4. (Optional) Go to the
    Upgrade Settings
    section of the
    SampleResponseFile.Introscope.txt
    file and update
    enableBackup=
    to
    true
    .
    We strongly recommend that you enable this property to backup your database.
  5. Change the
    ca-eula
    setting to
    Accepted
    .
  6. In the
    InstallAnwhere Settings
    , ensure that
    INSTALLER_UI=silent
    .
    Default:
    silent
  7. Run the Installer from the command line, pointing to the
    SampleResponseFile.Introscope.txt
    file in Step 1.
    The upgrade is complete.
    If you encounter errors, review the
    <CA APM Install directory>/install/apm_postgresupgrade.log
    and
    <CA APM Install directory>/install/schematools.log and silent.install.failed.txt
    files.