Ticket #294 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

The total_*_size columns in maia_stats overflow too quickly

Reported by: rjl Owned by: rjl
Priority: normal Milestone: 1.0.1
Component: SQL scripts Version: 1.0.0 RC5
Severity: normal Keywords: overflow total_oversized_size oversized stats
Cc:

Description

The total_*_size columns in maia_stats are set to INTEGER for PostgreSQL (2 GB limit) and UNSIGNED INTEGER for MySQL (4 GB limit), but the value being stored in these columns is cumulative, and will eventually overflow the data type's allocation. Since it is not unreasonable for a site that processes 200+ 5 MB items to exceed a 2 GB limit, this will clearly result in an overflow error eventually. A larger data type is needed for these columns.

Change History

Changed 4 years ago by rjl

  • status changed from new to closed
  • resolution set to fixed

Fixed in [1002], where the PostgreSQL schema now uses BIGINTs, and the MySQL schema uses UNSIGNED BIGINTs. These 8-byte integers should be large enough to contain many centuries of accumulated mail sizes.

Changed 4 years ago by rjl

Changesets [1003] and [1004] complete this fix by applying the same solution to the maia_stats_history table and by updating the upgrade scripts accordingly.

Note: See TracTickets for help on using tickets.