User Tools

Site Tools


how_to:database_size

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
how_to:database_size [2013/08/30 12:20] – created paulhow_to:database_size [2018/11/14 10:45] (current) – external edit 127.0.0.1
Line 3: Line 3:
  
 If you are concerned about the size of the VPOP3 database, there are several factors which may make the database larger than you would expect: If you are concerned about the size of the VPOP3 database, there are several factors which may make the database larger than you would expect:
-  * The VPOP3 database contains a lot more information than just messages in mailboxes. It can settings, outgoing messages, historical logging information, statistical information for the spamfilter, information about archived messages, etc. Also, it generally keeps messages for a few days after they have been sent/deleted, for problem diagnosis purposes+  * The VPOP3 database contains a lot more information than just messages in mailboxes. This can include settings, outgoing messages, historical logging information, statistical information for the spamfilter, information about archived messages, etc. Also, it generally keeps messages for a few days after they have been sent/deleted, for problem diagnosis purposes
   * The database has many indexes to speed up access to data, these take up extra space   * The database has many indexes to speed up access to data, these take up extra space
   * As with most database systems, when an entry is deleted, the free space is not returned to Windows, but is simply marked as free, and will be reused  by the database later. This is for performance reasons. This means that a new database can grow quickly, but should eventually level out, as a near equilibrium is reached between the new and deleted data.   * As with most database systems, when an entry is deleted, the free space is not returned to Windows, but is simply marked as free, and will be reused  by the database later. This is for performance reasons. This means that a new database can grow quickly, but should eventually level out, as a near equilibrium is reached between the new and deleted data.
  
-A better way of seeing how much space is REALLY used by the data is to look at the size of the daily backups. Usually these will be much more stable in size. The backups do not contain the 'free space' or the database indexes. Depending on your settings, the backups may still grow, even if the amount of messages stays the same. This is because the data for the spam filter statistical analyser, historical logging, archived messages etc may still be increasing.+A better way of seeing how much space is REALLY used by the data is to look at the size of the daily backups. Usually these will be much more stable in size. The backups do not contain the 'free space' or the database indexes. Depending on your settings, the backups may still grow, even if the amount of messages stays the same. This is because the data for the spam filter statistical analyser, historical logging, archived messages etc may still be increasing. Note that the daily backups are usually compressed so will typically be about half the size of the uncompressed data.
  
 =====Seeing where the data is being used===== =====Seeing where the data is being used=====
Line 23: Line 23:
 Some of the tables which are commonly large are: Some of the tables which are commonly large are:
  
-  * messages.msgdata - this contains message data in mailboxes, including recently deleted messages+  * messages.msgdata - this contains message data in mailboxes, including recently deleted messages in VPOP3 Enterprise.
   * archive.archivemain - this contains the main index for archived messages   * archive.archivemain - this contains the main index for archived messages
   * logdb.* - these tables contain data for the 'historical logging & reporting' facility in VPOP3   * logdb.* - these tables contain data for the 'historical logging & reporting' facility in VPOP3
Line 31: Line 31:
   * outqueue.outmessages - this contains messages which are currently in, or have recently been in, the VPOP3 outqueue.   * outqueue.outmessages - this contains messages which are currently in, or have recently been in, the VPOP3 outqueue.
  
 +(Also, see [[http://wiki.postgresql.org/wiki/Disk_Usage]] )
 =====Diagnostics logs===== =====Diagnostics logs=====
-The PostgreSQL database stores diagnostics logs in the VPOP3\pgsql\data\pg_log folder. PostgreSQL does not manage these logs, so more and more logs will appear over time. Usually these logs are small, so do not take up much space. It is safe to delete the files from this folder, but **not** from any other folder in the VPOP3\pgsql\data folder tree.+The PostgreSQL database stores diagnostics logs in the VPOP3\pgsql\data\pg_log folder. VPOP3 v6+ manages these log files, but PostgreSQL does not, so in older versions of VPOP3, more and more logs will appear over time. Usually these logs are small, so do not take up much space (eg on one of our busy servers, a year's worth of logs takes up about 36MB). It is safe to delete the files from this folder, but **not** from any other folder in the VPOP3\pgsql\data folder tree.
  
how_to/database_size.1377865200.txt.gz · Last modified: 2018/11/14 10:44 (external edit)