Qlik Sense: Steps to reduce Excessive HDD space occupied by PostgreSQL.Article Number: 000053265 | Last Modified: 2019/06/05
Folder "C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.6\base\" is occupying 20GB+ with no obvious reasons. How to fix?
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.
The database admin can use the manual purge option offered through the Qlik Logging Service.
Open a command prompt with administrator privileges.
Go to C:\Program Files\Qlik\Sense\Logging.
Run Qlik.Logging.Service.exe archive --cutoff X (where X is the number of hours).
Run Qlik.Logging.Service.exe purge --cutoff X (where X is the number of hours, Specify zero to purge all the entries.).
If presented with a message stating the system is too busy, retry the command.
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)
cuttoff 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. This will result in loss of all logging data, but as this database is for centralized logging only, will not affect Qlik Sense itself. We do not recommend this unless the supported method is unsuccessful and the purge is critical.
Follow these steps:
- Backup first. Either use pg_dump.exe command or, in the case of Virtual Machine, do a full snapshot of the machine.
- Backup steps can be found in HELP page.
- On Central Node, stop all Qlik Sense services apart from Repository Database service.
- 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
- Once above commands are finished, restart all Qlik Sense services. Confirm Qlik Sense is back operational.
- Check if C drive has more space freed.
Have a Question?
Search Qlik's Support Knowledge database or request assisted support for highly complex issues.Submit a case
Experiencing a serious issue, please contact us by phone. View phone numbers and hours by region.