Steps to Upgrade PostgreSQL

Steps to Upgrade PostgreSQL

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 bin, lib, and LICENSE Folders in working/pgsql/


Navigate to <AppManager_home>/working/pgsql/ and verify the current state of the following folders:

✅ If bin_15.15, lib_15.15, and LICENSE_15.15 already exist (renamed by upgrade)

The upgrade has already renamed the old folders as backup. 

Info
Delete the following partially copied folders inside <AppManager_home>/working/pgsql/
  • bin
  • lib
  • LICENSE
Warning
 Delete only the folders that are partially copied or corrupted.

Then proceed to Step 3.

❌ If bin, lib, and LICENSE are still the original folders (NOT renamed yet)

The upgrade has not yet renamed them. Please rename the following folders before proceeding:

Info
Rename  <AppManager_home>/working/pgsql/bin to  <AppManager_home>/working/pgsql/bin_15.15
Rename  <AppManager_home>/working/pgsql/lib to  <AppManager_home>/working/pgsql/lib_15.15
Rename  <AppManager_home>/working/pgsql/LICENSE to  <AppManager_home>/working/pgsql/LICENSE_15.15

Then proceed to Step 3.

3. Copy New Folders from Staging Directory

Ensure that the directory <AppManager_home>/working/pgsql_15.17/ exists and contains the following folders:

Info
Copy:
  1. <AppManager_home>/working/pgsql_15.17/bin to <AppManager_home>/working/pgsql/bin
  2. <AppManager_home>/working/pgsql_15.17/lib to <AppManager_home>/working/pgsql/lib
  3. <AppManager_home>/working/pgsql_15.17/LICENSE to <AppManager_home>/working/pgsql/LICENSE
If the pgsql_15.17 Directory is missing
Follow the steps given below:
  1. Use the attached PostgreSQL package (ZIP files).
  2. Two ZIP files are available: pgsql_15.17_windows.zip and pgsql_15.17_linux.zip (Please refer to the attachment for the Linux version).
  3. Extract the appropriate ZIP file based on your environment (Windows/Linux).
  4. From the extracted contents, locate the pgsql/ folder.
  5. Copy these folders into: <AppManager_home>/working/pgsql/

4. Set Permissions (Linux Only)

Info
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 Version Binary

Run the following to confirm PostgreSQL 15.17 binaries are in place:

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

Linux: <AppManager_home>/working/pgsql/bin/pg_ctl --version
Quote
Expected output: pg_ctl (PostgreSQL) 15.17

6. Delete the Staging Directory

Once the copy is verified, delete the following staging directory:

Info
Delete the following folder inside <AppManager_home>/working/
  • pgsql_15.17

7. Start Applications Manager

Applications Manager will now start using the PostgreSQL 15.17 binaries with the existing database.

8. Delete the Old Backup Folders

Once Applications Manager starts successfully, delete the following old backup folders:

Info
Delete the following folders inside<AppManager_home>/working/pgsql/
  • bin_15.15
  • lib_15.15
  • LICENSE_15.15

                  New to ADSelfService Plus?