Netmail Archive 5.x
Netmail Archive 6.x
In some environments, PostgreSQL job reporting traces may come to occupy a large volume of disk space. In such cases, it is possible to recover disk space by manually deleting the trace table's contents without deleting the table itself. This article will explain how to do this. The example below illustrates the process using PostgreSQL 9.1 (be sure that the existing trace table data is not needed before doing this).
1. On the Master Netmail Archive node, open pgAdminIII. You may be prompted to enter the PostgreSQL password (see Step 3 if the password is unknown):
3. If the password is unknown, it can be obtained by using an LDAP browser and logging to the archive LDAP on the master node. The password is the same used for admin UI. (see screenshot below):
4. Enter the password, and expand the PostgresSQL 9.1 tree as per the example (e.g., Databases > netmailarchive > Schemas > public > Tables):
5. To find the size of a database, highlight the Database section (left pane) and select the Statistics tab on the right. The size of all PostgreSQL databases will be listed:
6. To see the estimated number of rows in the trace table, select the Tables section (left pane), and click the mplus_trace entry. The estimated number of rows in the table will be shown:
7. If the estimated row number is very large, you may delete the contents of the mplus_trace table (but not the table itself) to free up disk space. To delete the table's contents, execute an arbitrary SQL query
by clicking theicon. This will open the SQL editor page.
8. In the query box (see the screenshot below), enter the string ‘delete from mplus_trace’ (without quotes) and click the green Play button (green forward arrow on the toolbar) to run the query; results will appear in the Output pane of the SQL editor:
9. Once the trace content is deleted, confirm that space has been recovered by checking the database size again (see Step 5).
10. To prevent trace table related space issues in the future, make sure that the option to enable detailed logging to the database is disabled. To do this, log in to the Netmail Administration console and select the job agent and the job that generated the large volume of reporting data. Go to the 'log settings' tab of the job and if 'enable detailed logging to the database and trace files’ is checked, uncheck the box and save the changes.