Qlik Community

Ask a Question

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
kevinpintokpa
Creator II
Creator II

How to reduce the size of the NPrinting repository / PostGres database?

We have been running NPrinting 17.6 for nearly 3 years now.  In preparation for upgrading it to the latest version, I notice that the repository, stored in a PostGres database has become very large.  The database backup takes 15 minutes, and results in an 8 GB file.

Poking around some, I noticed that it is likely that the repository has stored the execution results of old reports without deleting them ever.  These are the five largest tables in the repository:

Table Name

Size

 

report_aud

5277

MB

cache_item

1794

MB

data_connection_field_value

167

MB

task_execution_log

161

MB

usr_aud

101

MB

 

Is there any way to prune these tables safely?  We don't need any NPrinting history that goes beyond one year.  I can construct some queries to identify and delete rows that belong to old task executions.  Any guidance is appreciated.

 

Labels (1)
5 Replies
Frank_S
Support
Support

@kevinpintokpa 

  • The version of NPRinting you are using does not have any limits on task execution, background audits and other DB logging.
  • I suggest upgrading to September 2019 release of NPrinting. That will/should cull the database organically.
  • Make sure to backup the DB before proceeding however.

Kind regards...

references:

We are just 'like' you and like to be liked when providing a helpful answer. You may also press the 'Solution Accepted' button if an answer provided resolves your question or issue... Cheers!
Ruggero_Piccoli
Employee
Employee

Hi,

Audit tables were removed starting from April 2019. From the official release notes:

Smaller backups
Auditing tables were removed from the Qlik NPrinting Repository. This saves disk space in the Qlik NPrinting Repository computer and the backups will have smaller dimensions avoiding upgrade issues in case of big installations or low free disk space.

So, as suggested by @Frank_S , upgrading to April 2019 or newer version will save the audit tables space. I strongly suggest to upgrade always to latest available version. 

Space used by other tables cannot be reduced because they are needed to Qlik NPrinting to work properly. They depends on the apps, connections, templates, etc you have in your installation. So keep the installation clearn by removing unuseful entities.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
kevinpintokpa
Creator II
Creator II
Author

So I tried the upgrade again today and it failed.  Monitoring the system carefully using various utilities, I noticed pg_dump.exe creating a huge backup file that finally failed when it was over 50 GB in size!  It failed with this message:

ERROR Qlik.NPrinting.Manager.Commands.Backup.BackupDbCommand - Qlik.NPrinting.Manager 17.6.0.0 Qlik.NPrinting.Manager.Commands.Backup.BackupDbCommand Process C:\Program Files\NPrintingServer\pgsql_old\bin\pg_dump.exe: pg_dump: [tar archiver] archive member too large for tar format

This was a silent failure that I found only because I was looking for it.  Afterwards, pg_restore.exe ran for over 15 minutes, perhaps trying to restore from the failed backup, and it finally failed with some generic error messages:

Error 0x80070643: Failed to install MSI package.

Any thoughts?  Perhaps I could try to truncate the large report_aud table just before I begin the upgrade?  We snapshot the systems, so I could always rollback if that fails.

 

 

 

 

 

Frank_S
Support
Support

Hi @kevinpintokpa 

Thank you for the well documented details regarding the issue here. I could not have diagnosed this here with out it.

In this edge case instance, we'll need you to submit a support case and quote the following internal R&D JIRA defect ID.

  1. OP-7838

We do see this occasionally and in those cases, R&D intervention will be necessary.

Kind regards...

We are just 'like' you and like to be liked when providing a helpful answer. You may also press the 'Solution Accepted' button if an answer provided resolves your question or issue... Cheers!
Ruggero_Piccoli
Employee
Employee

Hi,

When you run a Qlik NPrinting update procedure a backup copy of your installation is created automatically at the beginning (with old version of the installation) and at the end (with newer version). In your case the whole dimension of the database dump si too big to be stored in a single tar file.

As suggested by Frank, open a support ticket. The support team will reduce the size of the repository in order to be able to run the dump. Don't modify the repository by yourself. Remember that at this point you have not a backup copy because the creation of a backup failed. 

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.