
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Qlik Sense Enterprise on Windows: How To Upgrade Standalone PostgreSQL
May 22, 2024 5:53:40 AM
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:
- Preparation
- Upgrading to a later service release
- Upgrading to a new major PostgreSQL release
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).
- Download the PostgreSQL installer from them PostgreSQL site
- Stop the Qlik Sense Enterprise on Windows services. Leave your standalone PostgreSQL database running.
- Run the PostgreSQL installer and follow the instructions.
- 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.
- Download the PostgreSQL installer from them PostgreSQL site
- 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.
- Install the database on the standard 5432 port.
- Open a Windows File explorer and create a backup folder, such as C:\backup
- 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:
- Stop all Qlik Sense Enterprise on Windows services on all nodes. Leave postgresql-x64-12 service (your current repository) running
- Stop postgresql-x64-14 (your newly installed PostgreSQL instance)
- Open a Windows Command Line (CMD) as administrator
- Run:
SET PGPASSWORD=postgrespassword (replace this with the actual password) - Run:
cd “C:\Program Files\PostgreSQL\12\bin” - Run
pg_dumpall.exe -h localhost -U postgres -p 4432 -f c:\backup\backup_db.sql - 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.
- Stop all Qlik Sense Enterprise on Windows services on all nodes. Leave postgresql-x64-12 service (your current repository) running
- Migrate from 12 to 14
We are now moving our Qlik Sense repository from the earlier release of PostgreSQL into the new one.
- Start the postgresql-x64-14 service
- Stop postgresql-x64-12
- Open a Windows Command Line (CMD) as administrator
- Run:
cd “C:\Program Files\PostgreSQL\14\bin” - Run
psql -h localhost -U postgres -p 5432 -f c:\backup\backup_db.sql - 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.
- Start the postgresql-x64-14 service
- 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
- Open postgresql.conf and verify that the port is set to 4432 (the standard Qlik Sense port)
- (If not done already) stop the postgres-x64-12 service
- Restart the postgres-x64-14 service
- Start all Qlik Sense services
- 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

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Sebastian_Linser ,
This is helpful. I am checking on Pg_Upgrade, Instead of taking dumps and restoring it. Is there any known impact for Qlik Sense if we use this method?
Thanks,
Siva

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @Sivapriya_d
Using the method described above is the only verified method by Qlik Support.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Sonja_Bauernfeind ,
I tried migrating our postgre SQL DB Server from 9.6 to 11.12 using Pg_dump and Pg_Restore method suggested above. Post migration when i checked the Individual DB size (QSR,License,etc) its bit smaller from the size in OLD version.
Have you faced this kind of scenario?
Thanks,
Siva

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks @Sonja_Bauernfeind . This is the first time we are doing Postgre SQL upgrade in our platform. I was anxious due to the small DB size and thinking of its impact on Qlik Sense.
Is possible to share your experience with the upgrade ? the things which we can expect like the above DB size.
This would help people who do new upgrades like us.
Lastly Can you please share the roll back steps to be performed in both Postgre SQL and Qlik Sense end jus in case.
Thanks for all your inputs and guidance till now
Thansk,
Siva

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @Sivapriya_d
Next to the difference in sizes, we cannot share any additional information.
As for the rollback: Do you mean a rollback from the Postgre SQL upgrade or a Qlik Sense upgrade?
In short, what you would need is a backup of your previous QSR on the 9.6 database (which you have taken already for the upgrade step) and restore it to your Qlik Sense System as described in: Backup and Restore Qlik Sense .
Also please note that the instructions in this article are for if you have a stand-alone Postgre SQL. Not the bundled one. If you are looking for instructions for the bundled one, see Qlik Sense May 2021 - Upgrade bundled PostgreSQL to 12.5 version .

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content


- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi There,
We have a QS cluster with a standalone Postgresql and will like to get it back to the bundle version so that we dont have to worry about Postgresql updates.
Will a clean new install and a restore DB procedure work or we need to worry about anything else?
What about rim nodes? Need to do anything there?
Thanks!
Pablo

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hey @pablodelcerro See our reply here for an answer 🙂

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi all!
We've a doubt about Postgres/Qlik upgrade order on a standalone PG install.
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?
We know upgrading our 5 QS nodes takes lots of time and we have a small work window, so we cannot take both upgrades in same wor windows.
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?
Best regards,
Alonso Torres.