Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
elaine_ahlfeldt
Partner - Contributor
Partner - Contributor

If Qlik PostgreSQL Installer 1.4 upgrade 9.6->14.8 fails at renaming folder step, what is required to finish upgrade manually?

Hi!

Yesterday I upgraded a sorely outdated Qlik Sense Enterprise installation in steps from June 2020 up to November 2023 Patch 2, on an internal reference environment. Every step went smoothly until I had Qlik Sense at February 2022 and ran the Qlik PostgreSQL Installer 1.4 in order to upgrade the database from PG 9.6 to 14.8, according to your support article Upgrading and unbundling the Qlik Sense Repository Database using the Qlik PostgreSQL Installer. This upgrade failed partway through with the following error message:

2024-01-11 15:37:22.583 +01:00 [ERR] Error! Exception occurred while trying to rename old database folder: C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.6 to C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.6_deprecated: System.IO.IOException: Access to the path 'C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.6' is denied.

The installer ran as Administrator and the service user had full control of it + subfolders and files, so I couldn't figure out why it would run into a permission error, but I digress.

Since the Postgres 14.8 binaries, Windows service and config files had all been handled at this point, I could not start the installer again as "PostgreSQL 14.8 is already installed on your system". A backup file had also been dumped from the old database, so I decided to finalize the migration manually. I imported the dump file through psql.exe, followed steps 13-16 in the aforementioned article, and then shut down all services in order to run the last remaining Qlik Sense upgrades.

At this point I was reminded that the Postgres service itself needs to be running and started it back up, but the Qlik Sense installer would still fail to recognize that it was running. Troubleshooting eventually lead me to figure out why: PostgreSQL was now running on the stock default port 5432 instead of Qlik Sense's preferred 4432, so I specified 4432 in postgresql.conf and restarted the service. After this, the rest of the upgrade ran smoothly.

I had previously upgraded a similar environment, where the Qlik PostgreSQL Installer ran to completion, and never ran into the port mismatch on that system.

From this experience, I could conclude the following:

  • While running, the Qlik PostgreSQL Installer starts the new Postgres service once on port 4432, since Qlik was functional until I stopped and restarted the Postgres service.
  • At some time after the point of failure in this instance, the installer would have made some adjustment to ensure that the service always starts on port 4432 if it had run to completion.
  • Since the port assignment was not present in postgresql.conf, which had been copied from the old installation, this adjustment is seemingly made somewhere else. I do not know where.
  • I also don't know if the installer would have made any other adjustments that I have neglected and which could affect functionality.

My question is therefore:

If the Qlik PostgreSQL Installer 1.4 fails at the "rename old folder to _deprecated" step, and I work around this by manually importing the backup file and assigning the correct port in postgresql.conf for the new Postgres instance, is there any important task left that I have neglected to take over from QPI? Or is this sufficient to get a system running without any hidden issues?

Thank you for bearing with the long preamble, I didn't know how to provide enough context with less. Full QPI log file attached.

Labels (1)
1 Reply
Maria_Halley
Support
Support

@elaine_ahlfeldt 

I suggest that you log a case with support for this issue.