How do I upgrade the PostgreSQL version in Applications Manager?

How do I upgrade the PostgreSQL version in Applications Manager?

Use the following table to identify the PostgreSQL minor version applicable to your Applications Manager build.

PostgreSQL version to upgrade toApplications Manager build
15.17180400
15.18181100, 180403 and above in the 1804xx hotfix series
17.11182300, 182001 and above in the 1820xx hotfix series

Follow the steps below to upgrade PostgreSQL to the version applicable to your build. Replace the version-specific folder names and package references with those corresponding to your target version.

1. Stop Applications Manager

Ensure Applications Manager is completely stopped before proceeding.

Info

Windows:
<AppManager_home>\shutdownApplicationsManager.bat -force

Linux:
<AppManager_home>/shutdownApplicationsManager.sh -force

2. Check and prepare the PostgreSQL Folders

Navigate to <AppManager_home>/working/pgsql/ and check the current state of the bin, lib, and LICENSE folders.

Replace <OLD_VERSION> below with the PostgreSQL version currently installed in your environment.

If the backup folders already exist

Check whether the following folders exist:

  • bin_<OLD_VERSION>

  • lib_<OLD_VERSION>

  • LICENSE_<OLD_VERSION>

If these folders already exist, the original folders have been renamed as backups during the upgrade.

Delete only the partially copied or corrupted folders inside <AppManager_home>/working/pgsql/`:

  • bin

  • lib

  • LICENSE

Proceed to Step 3.

If the original folders have not been renamed

If bin, lib, and LICENSE are still the original folders, rename them as follows:

  • Rename bin to bin_<OLD_VERSION>.

  • Rename lib to lib_<OLD_VERSION>.

  • Rename LICENSE to LICENSE_<OLD_VERSION>.

Proceed to Step 3.

3. Copy the new folders from the Staging Directory

Replace <NEW_VERSION> with the PostgreSQL version applicable to your Applications Manager build: 15.17, 15.18, or 17.11.

Ensure that <AppManager_home>/working/pgsql_<NEW_VERSION>/ exists and contains the following folders:

  1. <AppManager_home>/working/pgsql_<NEW_VERSION>/bin

  2. <AppManager_home>/working/pgsql_<NEW_VERSION>/lib

  3. <AppManager_home>/working/pgsql_<NEW_VERSION>/LICENSE

Copy these folders to the corresponding locations:

  1. Copy pgsql_<NEW_VERSION>/bin to <AppManager_home>/working/pgsql/bin.

  2. Copy pgsql_<NEW_VERSION>/lib to <AppManager_home>/working/pgsql/lib.

  3. Copy pgsql_<NEW_VERSION>/LICENSE to <AppManager_home>/working/pgsql/LICENSE.

If the staging directory is missing

  1. Obtain the PostgreSQL package for the required version and operating system from the package attached to this KB or the download link provided for your build.

  2. Extract the appropriate ZIP file for Windows or Linux.

  3. Locate the pgsql/ folder in the extracted contents.

  4. Copy the bin, lib, and LICENSE folders into <AppManager_home>/working/pgsql/.

Important: Ensure that you use the PostgreSQL package matching your target version and operating system.

4. Set permissions (Linux Only)

Set the required permissions for the copied folders:

chmod -R 757 <AppManager_home>/working/pgsql/bin

chmod -R 757 <AppManager_home>/working/pgsql/lib

chmod -R 757 <AppManager_home>/working/pgsql/LICENSE

5. Verify the new PostgreSQL version

Run the following command to verify that the PostgreSQL binaries have been upgraded.

Info

Windows:
<AppManager_home>\working\pgsql\bin\pg_ctl.exe --version

Linux:
<AppManager_home>/working/pgsql/bin/pg_ctl --version

Expected output: The command should display the PostgreSQL version applicable to your Applications Manager build:

  • pg_ctl (PostgreSQL) 15.17 for build 180400

  • pg_ctl (PostgreSQL) 15.18 for builds 181100 and 180403

  • pg_ctl (PostgreSQL) 17.11 for builds 182300 and 182001

6. Delete the staging directory

Once the copied binaries have been verified, delete the staging directory corresponding to your target PostgreSQL version from <AppManager_home>/working/.

For example, for PostgreSQL 15.17, delete:

  • pgsql_15.17

For PostgreSQL 15.18, delete:

  • pgsql_15.18

For PostgreSQL 17.11, delete:

  • pgsql_17.11

7. Start Applications Manager

Start Applications Manager and verify that it starts successfully using the upgraded PostgreSQL binaries with the existing database.

8. Delete the old backup folders

Once Applications Manager starts successfully and you have verified that it is functioning correctly, delete the backup folders created in Step 2.

Replace <OLD_VERSION> with the original PostgreSQL version in your environment.

Delete the following folders inside <AppManager_home>/working/pgsql/:

  • bin_<OLD_VERSION>

  • lib_<OLD_VERSION>

  • LICENSE_<OLD_VERSION>