A major compaction can be automatically triggered.
Prerequisites
Before triggering a major compaction, ensure that the global major compaction switch is enabled. This switch is controlled by the cluster-level parameter enable_major_freeze, with a default value of True, indicating the switch is on.
If the global major compaction switch is not enabled for the current cluster, refer to the following steps to enable it.
Log in to the
systenant of the cluster as therootuser.Check whether the global major compaction switch is enabled.
obclient> SHOW PARAMETERS LIKE 'enable_major_freeze';If it is not enabled, execute the following statement to enable the switch.
obclient> ALTER SYSTEM SET enable_major_freeze='True';For more information about the
enable_major_freezeparameter, see enable_major_freeze.
Trigger conditions for automatic major compaction
A major compaction is automatically triggered when the number of minor freezes reaches a certain threshold.