Configure gpperfmon history retention to a custom number of months for housekeeping and capacity control. While the official documentation generally discourages modifying the default retention policy, it is still possible to safely override it to a custom retention period if required.
In the GPCC configuration file (gpcc.conf, path depends on installation), set:
[history]
enable_history = true
min_query_time = -1
enable_plannode_collection = true
retention_period = 18
purge_time = 00:00
Explaination
enable_history = true
Enables GPCC history data collection into gpperfmon.
min_query_time = -1
Collects history for all queries; in large or busy systems this can be increased to only capture slower queries and control data growth.
enable_plannode_collection = true
Stores plan node details to support query performance analysis.
retention_period = 18
Retains history data for 18 months; monthly partitions older than this window are subject to automatic purge logic.
purge_time = 00:00
Schedules the daily purge of expired history data at midnight.
Save the file and then restart or reload the GPCC service to ensure the new history settings take effect.