Qlik Sense: Steps to reduce Excessive HDD space occupied by PostgreSQL.Article Number: 000053265 | Last Modified: 2019/10/01
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. 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:
- 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.
- Stop the Qlik Logging Service on all nodes
- 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 Logging services on each node.
- 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.