A major compaction can be automatically triggered.
Prerequisites
To enable the system to automatically trigger a major compaction, make sure that global major compaction is enabled. Global major compaction is controlled by the cluster-level parameter enable_major_freeze. The default value is True, which specifies to enable global major compaction.
If global major compaction is disabled for the current cluster, perform the following steps to enable this feature:
Log in to the
systenant of the cluster as therootuser.Verify whether global major compaction is enabled.
obclient> SHOW PARAMETERS LIKE 'enable_major_freeze';If global major compaction is not enabled, execute the following statement to enable the feature:
obclient> ALTER SYSTEM SET enable_major_freeze='True';For more information about the
enable_major_freezeparameter, see enable_major_freeze.
Conditions for automatically triggering a major compaction
When the number of freezes (minor freezes) reaches a certain threshold, a major compaction will be triggered automatically.