Qlik Community


Search or browse our knowledge base to find answers to your questions ranging from account questions to troubleshooting error messages. The content is curated and updated by our global Support team


Qlik Sense: Steps to reduce Excessive HDD space occupied by PostgreSQL.

Showing results for 
Search instead for 
Did you mean: 
Digital Support
Digital Support

Qlik Sense: Steps to reduce Excessive HDD space occupied by PostgreSQL.

PostgreSQL log (Qlik Sense logging) fills up disk. Log database needs to be cleaned.

Folder "C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.6\base\" is occupying 20GB+ with no obvious reasons. How to fix?




Likely caused by corruption in database "QLogs". As this database is for centralized logging only, dropping it should not affect Qlik Sense's functionality. The exact mechanism / cause / trigger is unknown at the moment.

To investigate which table takes up too much space, see Excess space consumption by Repository folder of Qlik .



Please review the supported method of purging the database as documented on the Qlik Help Site.

The database admin can use the manual purge option offered through the Qlik Logging Service.

  1. Open a command prompt with administrator privileges.

  2. Go to C:\Program Files\Qlik\Sense\Logging.

  3. Run Qlik.Logging.Service.exe archive --cutoff X (where X is the number of days).

  4. Run Qlik.Logging.Service.exe purge --cutoff X (where X is the number of days, Specify zero to purge all the entries.).

  5. If presented with a message stating the system is too busy, retry the command.

  6. If the second try generates the same message, try again at a less busy time on the server.

Restart the Qlik Logging Service.

Purging log entries:
  Purges all the archived log entries that are older than specified cutoff.
  Usage: Qlik.Logging.Service.exe purge [<options>]
    --cutoff or -c (Required)
      cutoff in days; unless the --hours option is used in which case the value is interpreted as hours.
      Specify zero to purge all the entries.
    --hours (Optional) Causes the value given for the purge cutoff (--cutoff) to be interpreted as hours instead of the default interpretation as days

Should this method not be possible, the database could be entirely dropped. Note that logging still takes place on disk and is archived to a central folder, so no loss of data logging is expected from this step. If you wish to leave the logging database off after this, be sure to stop the logging service on each node in the environment. Otherwise, follow the steps below to re-set it up.

Follow these steps:

  1. Backup first. Either use pg_dump.exe command or, in the case of Virtual Machine, do a full snapshot of the machine.
  2. Stop the Qlik Logging Service on all nodes
  3. Start an elevated command line window and run following commands:
    • "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin\dropdb.exe" -h localhost -p 4432 -U postgres QLogs 
    • "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin\createdb.exe" -h localhost -p 4432 -U postgres -T template0 QLogs
  4. Once above commands are finished, restart all Qlik Logging services on each node.
  5. Check if C drive has more space freed.


Related Content

Excess space consumption by Repository folder of Qlik

Labels (1)
Version history
Last update:
‎2021-05-25 06:26 AM
Updated by: