Skip to main content Skip to complementary content

Silently installing or upgrading PostgreSQL using the Qlik PostgreSQL Installer

When running a silent installation, PostgreSQL is installed with no dialogs at all. This means that all features, properties, and user selections must be known before performing a silent installation. All setup options that are available in the user interface of the installer can be performed with silent operations.

  1. Open a Command Prompt window.

  2. Navigate to the folder containing the Qlik_PostgreSQL_setup.exe file.

  3. Enter Qlik_PostgreSQL_setup.exe followed by the preferred silent installation Syntax.

    Example installation command:

    Qlik_PostgreSQL_setup.exe -silent acceptqca=1 iprange=0.0.0.0/0,::/0 dbport=4432 maxconnections=200 listenaddresses=* dbusername=qliksenserepository dbuserpassword=your_password dbsuperuserpassword=your_password

    Details about the commands and their arguments can be found below.

    Information noteElevation will take place if run from an unelevated process and the UAC is on.
  4. Validate that all services and nodes are operating as expected.

If you are upgrading, you also need to remove the old Qlik Sense Repository Database from the server once the upgrade and all validation are complete.

Information noteThis step is required. Failing to remove the old service will lead to upgrade or patching issues.
  1. Open a Command Prompt window and run:

    c:\cd ProgramData\Package Cache

  2. From there, do one of the following:

    • If you upgraded from 9.6, run:

      c:\ProgramData\Package Cache\dir /s PostgreSQL.msi

      The folder containing PostgreSQL.msi is displayed.

    • If you upgraded from 12.5, run:

      c:\ProgramData\Package Cache\dir /s PostgreSQL125.msi

      The folder containing PostgreSQL125.msi is displayed.

  3. Right-click the PostgreSQL.msi or PostgreSQL125.msi file and select Uninstall from the menu.

  4. Reinstall the PostgreSQL binaries.

    Information note
    • If you don't reinstall the binaries, you'll encounter errors when running service configuration scripts.

    • This step is optional if Qlik Sense is immediately upgraded after using Qlik PostgreSQL Installer, as the correct binaries will be automatically installed.

    1. Open a Command Prompt as administrator.

    2. Navigate to the location of the previously located .msi file.

      Example: cd C:\ProgramData\Package Cache\{GUID}

    3. Run the following command replacing PostgreSQL125.msi with the appropriate .msi based on your previous version used:

      • For Qlik Sense August 2023 and later:

        msiexec.exe /qb /i "PostgreSQL14.msi" SKIPINSTALLDBSERVICE="1" INSTALLDIR="C:\Program Files\Qlik\Sense"
      • For Qlik Sense February 2022 to May 2023:

        msiexec.exe /qb /i "PostgreSQL125.msi" SKIPINSTALLDBSERVICE="1" INSTALLDIR="C:\Program Files\Qlik\Sense"
      Information noteIf you installed in a custom directory, adjust INSTALLDIR accordingly. For example, if installed in D:\Qlik\Sense, enter INSTALLDIR="D:\QLIK\Sense".

      This will reinstall the binaries without installing a database.

Syntax

Syntax
Qlik_PostgreSQL_setup.exe [-silent] {-log=path\filename} {acceptqca=1|0} {iprange=IpAddresses} {maxconnections=max connection number} {listenaddresses=ipv4/ipv6 addresses} {dbusername=[domain\username]} {dbuserpassword=password} {dbsuperuserpassword=password} {dbhost=hostname} {dbport=port} {dbinstallationpath=binary path} {dbdatapath=data folder} {qpiconfig=”configfilepath”} Fresh installation mode.
Qlik_PostgreSQL_setup.exe [-silent] {-log=path\filename} {acceptqca=1|0} {dbsuperuserpassword=password} {dbhost=hostname} {dbport=port} {dbinstallationpath=binary path} {qpiconfig=”configfilepath”} Upgrade mode.
Qlik_PostgreSQL_setup.exe -? or -h Brings up the on-screen silent setup help.

Commands

Commands
Command Type Purpose
-silent - Command line-driven setup without UI (mandatory).
-log [log file name with path]

Log file directory and log file name.

Note: The user must have access to this directory

Arguments

Arguments are separated by a space and presented in the form [Argument]="[Value]". The double quotes can normally be omitted but may be needed, for example, when a path contains spaces.

The default values are the same as those used in the setup user interface.

Arguments
Argument Values Purpose Scope
acceptQCA 1|0

Accepts the Qlik Customer Agreement (QCA).

Note: This argument is mandatory when installing or upgrading, and you must accept the QCA to install successfully.

Install/Upgrade
iprange [IP addresses] IP addresses separated by comma.

For all IPV4 and all IPV6 adresses, enter 0.0.0.0/0,::0/0.

Install
maxconnections [max connection number] The maximum number of concurrent connections to the database. Install
dbinstallationpath [path to custom install directory] Defines the directory if the default install directory will not be used (C:\Program Files\PostgreSQL\14). Install/Upgrade
dbdatapath [path to custom data directory] Defines the directory if the default data directory will not be used (C:\Program Files\PostgreSQL\14\data). Install/Upgrade
dbbackuppath [path to custom backup directory] Database backup folder path. Upgrade
listenaddresses [IP addresses/ranges] Addresses that the database service should listen to. For example: 0.0.0.0/0, ::/0.

To listen to all addresses, enter *.

Install
dbusername [username] Username of the repository database user. Install
dbuserpassword [password] Password of the repository database user. Install
dbsuperuserpassword [password] Password of the Postgres database super user. Install/Upgrade
dbhost [address of the database server] Postgres database server address. If left empty, localhost is used. Install/Upgrade
dbport [database port] Postgres database port. Install/Upgrade
qpiconfig [path to configuration file including the filename] Path to a configuration file where settings for silent installation are stored. Install/Upgrade

Examples of silent installation commands

An example of a silent installation command:

Qlik_PostgreSQL_setup.exe -silent acceptqca=1 iprange=0.0.0.0/0,::/0 dbport=4432 maxconnections=200 listenaddresses=* dbusername=qliksenserepository dbuserpassword=your_password dbsuperuserpassword=your_password

Another example of a silent installation command specifying a log file:

Qlik_PostgreSQL_setup.exe -silent -log="c:\temp\qpilog\qpiinstall.log" acceptqca=1 dbport=4432 maxconnections=300 listenaddresses=* dbusername=qliksenserepository dbuserpassword=your_password dbsuperuserpassword=your_password

An example of a silent installation command that points to a configuration file containing the settings to be used in the installation:

Qlik_PostgreSQL_setup.exe -silent -log="c:\temp\qpilog\qpiinstall.log" acceptqca=1 qpiconfig="C:\temp\qpicfg\QpiConfig.cfg"

QPI configuration file

The Qlik PostgreSQL Installer configuration file is in XML format. The file must follow the structure provided in the example below. Substitute the placeholder values with your own.

If a value is left empty, the default value will be used. The default values are the same as those used in the setup user interface.

<?xml version="1.0"?>
<CommandLineArguments xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <DbUserName>qliksenserepository</DbUserName>
  <DbUserPassword>your_password</DbUserPassword>
  <DbSuperUserPassword>your_password</DbSuperUserPassword>
  <DbHost></DbHost>
  <DbPort>4432</DbPort>
  <ListenAddresses>*</ListenAddresses>
  <IpRange>0.0.0.0/0,::/0</IpRange>
  <MaxConnections>300</MaxConnections>
  <DbInstallationPath></DbInstallationPath>
  <DbDataPath></DbDataPath>
  <DbBackupPath></DbBackupPath>
 </CommandLineArguments>

Configuration file syntax

Configuration file syntax
Setting Description
DbUserName Username of the repository database user. The default is qliksenserepository.
DbSuperUserPassword Password of the Postgres database super user.
DbUserPassword The password of the repository database user.
DbHost Postgres database server address. If left empty, localhost is used.
DbPort Postgres database port.
ListenAddresses

Addresses that the database service should listen to. For example: 0.0.0.0/0, ::/0. To listen to all addresses, enter *.

IpRange

IP addresses separated by comma. For all IPV4 and all IPV6 adresses, enter 0.0.0.0/0,::0/0.

MaxConnections The maximum number of concurrent connections to the database.
DbDataPath Data path for the Postgres database. The default is C:\Program Files\PostgreSQL\14\data.
DbBackupPath Backup path for the database upgrade. The default is C:\ProgramData\Qlik\Sense\PostgreSQL\{dbversion}\backup.
DbInstallationPath Database installation folder path. The default is C:\Program Files\PostgreSQL\14\.

Troubleshooting

Troubleshooting typically starts by interpreting the installation log files. The log files are, by default, stored in the local temp directory of the current user.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!