Skip to main content
Announcements
Talend Data Catalog 8.0 End of Support: December 31, 2024 Get Details

Qlik Sense Enterprise on Windows: How To Upgrade Standalone PostgreSQL

100% helpful (3/3)
cancel
Showing results for 
Search instead for 
Did you mean: 
Sebastian_Linser

Qlik Sense Enterprise on Windows: How To Upgrade Standalone PostgreSQL

Last Update:

May 22, 2024 5:53:40 AM

Updated By:

Sebastian_Linser

Created date:

Dec 9, 2019 11:01:37 AM

This document is a general guide and is provided as is. Modifications to the process may be necessary depending on your individual database setup.

If you have installed a standalone PostgreSQL database, or if you have used the Qlik PostgreSQL Installer (QPI) to upgrade and decouple your previously bundled database, then you can upgrade PostgreSQL at any time. This means you control maintenance and can immediately react to potential PostgreSQL security concerns by upgrading to a later service release or a later major version.

Content

 

Requirements:

  • Only upgrade to a supported version of PostgreSQL. See the Qlik Sense Enterprise on Windows System Requirements for details. 
  • This guide covers deployments where PostgreSQL has been installed separately or previously unbundled using the Qlik PostgreSQL installer. 

This document covers the following scenario:

  • Windows Server OS. The use of Linux, in managed cloud deployments or on-prem, is not covered. 
  • Generic PostgreSQL deployment. Stream replication, SSL, or any other advanced configuration are not covered.

 

Preparation

Run a complete backup of Qlik Sense Enterprise on Windows site as described in Backup and restore Qlik Sense Enterprise on Windows.

  • Qlik Sense Repository Database (from PostgreSQL database server)
  • Qlik Sense share folder
  • Qlik Sense CA-signed certificates

 

Upgrading to a later service release

These steps apply if you are upgrading within a major PostgreSQL release (example: 14.5 to 14.8). 

  1. Download the PostgreSQL installer from them PostgreSQL site
  2. Stop the Qlik Sense Enterprise on Windows services. Leave your standalone PostgreSQL database running.
  3. Run the PostgreSQL installer and follow the instructions.
  4. Start the Qlik Sense Enterprise on Windows services.

No further steps are required.

 

Upgrading to a new major PostgreSQL release

If you are moving to a higher major version, an in-place upgrade will not be possible. Instead, we will install the the new version in parallel, then then migrate the old database and eventually uninstall the old version. Our example is written using PostgreSQL 12 to 14. 

  1. Download the PostgreSQL installer from them PostgreSQL site

  2. Run the installer

    During install:

    • Install the database on the standard 5432 port. 

      This allows us to have 12 running on the Qlik Sense default 4432 port and the 14 instance on 5432.

    • Set the same password as the one currently in use with the version 12 PostgreSQL instance. 

  3. Open a Windows File explorer and create a backup folder, such as C:\backup 

  4. Backup your version 12 database 

    This step is crucial. You may have already backed up your site, but in this step we will create the specific backup we will use to migrate your database, using a modified command.

    To do so:

    1. Stop all Qlik Sense Enterprise on Windows services on all nodes. Leave postgresql-x64-12 service (your current repository) running

    2. Stop postgresql-x64-14 (your newly installed PostgreSQL instance)

    3. Open a Windows Command Line (CMD) as administrator

    4. Run:
      SET PGPASSWORD=postgrespassword (replace this with the actual password)

    5. Run:
      c
      d “C:\Program Files\PostgreSQL\12\bin”

    6. Run
      pg_dumpall.exe -h localhost -U postgres -p 4432 -f c:\backup\backup_db.sql

    7. Follow the onscreen instructions and wait until the backup is finished

      Note: If you are prompted to input the password (even if it was previously entered correctly), you will need to modify pg_hba.conf

      Location: 
      C:\Program Files\PostgreSQL\12\data\pg_hba.conf

      Change md5 to trust and restart the postgresql-x64-12 service. See Changing the Database Superuser Password without Qlik Sense Installed for details.

      Once the backup has completed, revert back to md5.

  5. Migrate from 12 to 14

    We are now moving our Qlik Sense repository from the earlier release of PostgreSQL into the new one.

    1. Start the postgresql-x64-14 service

    2. Stop postgresql-x64-12

    3. Open a Windows Command Line (CMD) as administrator

    4. Run:
      c
      d “C:\Program Files\PostgreSQL\14\bin”

    5. Run
      psql -h localhost -U postgres -p 5432 -f c:\backup\backup_db.sql

    6. Follow the onscreen instructions.

      Note: If you receive the error password authentication failed for user "postgres", (even if it is correct), you will need to modify pg_hba.conf

      Location: C:\Program Files\PostgreSQL\14\data\pg_hba.conf


      Change scram-sha-256 to md5 and restart the postgresql-x64-14 service  and redo step e). See Changing the Database Superuser Password without Qlik Sense Installed for details.

  6. With the import finished, copy the following two files from your old 12 data folder into your new 14 data folder:

    • pg_hba.conf 
    • postgresql.conf 

  7. Open postgresql.conf and verify that the port is set to 4432 (the standard Qlik Sense port)

  8. (If not done already) stop the postgres-x64-12 service

  9. Restart the postgres-x64-14 service

  10. Start all Qlik Sense services

  11. Once you have confirmed all functionality and tested, uninstall PostgreSQL 12. This can be done directly from the Windows Control Panel and Programs and Features

 

Related Content:

Upgrading and unbundling the Qlik Sense Repository Database using the Qlik PostgreSQL Installer 
How to manually upgrade the bundled Qlik Sense PostgreSQL version to 12.5 version 
Changing the Database Superuser Password without Qlik Sense Installed 



Labels (1)
Comments
Sonja_Bauernfeind
Digital Support
Digital Support

Hello @Gestion-PSD 

Is it possible and recommended to upgrade Qlik Sense (from Sep'19 to Feb'22) keeping Postgres 9.6 and later, in another intervention, to upgrade Postgres from 9.6 to 12.x?

This is possible. Qlik Sense February 22 supports 9.6 (see System Requirments), which means you can upgrade from Sep 19 to Feb 22 and keep your Postgre instance at 9.6 for the time being. 

In resume, are there any known (or spected) issue if we upgrade Postgres 9.6 to 12.x on an active (but obviously stopped) Qlik Sense installation?

None that we are aware of if the instructions are followed.

All the best,
Sonja 

Sebastian_Linser

@Gestion-PSD  you can always keep 9.6 even with May2022. The new installation will only get 12.5 a upgrade keep the same DB version. This article here explains the move to a standalone instance. The Qlik Setup never touch a standalone instance for inital setup, it would only upgrade the existing databases which were created post setup.

Qlik is working on a conversion of the embedded PostgreSQL instance from 9.6 to 12.5 without a full reinstall, seeing your questions that would fit better your needs. 

adamb14
Contributor II
Contributor II

FYI if your going from Standalone 9.6 to Standalone 14.10 copying the 'postgresql.conf ' from 9.6 over to 14.10 (Step 6.) will cause 14.10 Service not to start with the following error. 

'GMT [7316] FATAL: configuration file "C:/Program Files/PostgreSQL/14/data/postgresql.conf" contains errors'

We ended up having to simply use the 14.10 postgresql.conf file and make appropriate changes for Port and Max Connections, everything else was default in 9.6.

Apart from that the Instructions worked perfectly.

 

MrWendal
Partner - Contributor II
Partner - Contributor II

Hello Everyone,

First, thanks for the guide! Was very helpful in upgrading unbundled Postgres instances.

I did run into one issue however, when installing Postgres 14.x I kept running into an error at the end of the install when it tried to run the post install steps. The service would not be created and I got an error that said "failed to load sql modules in database cluster". 

Turns out the issue was the superuser password had a special character in it that would cause the install to fail. Also I read setting the 

To resolve this I used a different superuser password during the install, then afterwards I logged into pgAdmin4 and changed the superuser password to the inital one. That way I woudnt have to go through changing all the microservices to a new password, which can be a lot of work on a multinode enviornment.

Hope this helps anyone running into simular issues!

Best Regards,

Wendell Truax

fabdulazeez
Partner - Creator III
Partner - Creator III

Hi @Sonja_Bauernfeind ,

We previously upgraded to version 12 using QPI and are now planning to upgrade to version 14 as outlined in the article. We currently have the February 2024 version of Qlik Sense. The article mentions steps for uninstalling the 12 binaries and re-install the binaries for 14 without installing a database. Should we follow these steps, or will the process be handled within the standalone upgrade procedure mentioned above?

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @fabdulazeez 

Let me get clarity for you on this.

All the best,
Sonja

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @fabdulazeez 

Only the steps in this article are relevant for your use case.

All the best,
Sonja 

fabdulazeez
Partner - Creator III
Partner - Creator III

Thanks @Sonja_Bauernfeind .

I only have "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\12.5" on our server with the February 2024 version, and there is no 14.8 folder. I just wanted to confirm. Thanks for the clarification.

fabdulazeez
Partner - Creator III
Partner - Creator III

After following the above steps, we encountered the error below while attempting to uninstall PostgreSQL 12 from Programs and Features.

fabdulazeez_0-1724049221373.png

When we clicked "Yes," it was removed from the list, but the service still remains. Please advise on how to proceed with the uninstallation.

Sebastian_Linser

To deinstall the service from the list you could use sc delete postgresql-x64-12

that will delete your service. https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/sc-delete

Why the uninstaller is broken i can't answer, this is the PostgreSQL uninstaller not developed by Qlik.

Normally you should see that window comming up when running the uninstall

Sebastian_Linser_0-1724050788562.png

followed by 

Sebastian_Linser_1-1724050813327.png

 

Version history
Last update:
‎2024-05-22 05:53 AM
Updated by: