There are too many ts_us_sessions_map and defect table partitions. How can these be removed?
The Collector is keeping old hourly ts_us_sessions_map table partitions and 'ts_defects' table partitions. This occurs when defect aggregation is behind or not running, then the defect and session map partitions are not dropped.
To resolve this, manually drop the unneeded partitions.
Determine the partitions to drop by running this query:
select tablename from pg_tables where tablename like 'ts_%' order by tablename ;
Then do the following sequence:
- Backup the APM Database using Introscope's database backup script located in <EM home>/install/database-scripts/<os>/dbbackup-postgres (for Postgres) or for Oracle, use Oracle's built in utility. (important!!!)
- Stop all EMs running APM CE Services
- Run the sql commands to drop the unneeded tables such as drop ts_defects_date or ts_us_sessions_map_date ;
- Restart all EMs running APM CE Services
- Generate Defects
- Validate in logs and APM GUI seeing defects and session maps
Note that in 9.5.1, there is a fix for too many old defect or stats partitions - (TT 85377). This fix drops session maps and defect partitions older than 60 days.