Description
You can execute this statement in a normal tenant to initiate major or minor compactions for the tenant. You can initiate manual major and minor compactions only at the tenant level.
Syntax
ALTER SYSTEM merge_action;
merge_action:
MAJOR FREEZE
| MINOR FREEZE
| {SUSPEND | RESUME} MERGE
| CLEAR MERGE ERROR
Parameters
| Parameter | Description |
|---|---|
| MAJOR FREEZE | Initiates a major compaction. Note A user in a normal tenant can initiate a major compaction only for the tenant. |
| MINOR FREEZE | Initiates a minor compaction. Note A user in a normal tenant can initiate a minor compaction only for the tenant. |
| {SUSPEND | RESUME} MERGE | Suspends or resumes the major compaction. Note A user in a normal tenant can suspend or resume the major compaction only for the tenant. |
| CLEAR MERGE ERROR | Clears the error flag of a major compaction. Note A user in a normal tenant can clear the error flag of a major compaction only for the tenant. |
Examples
Major compaction examples
Initiates a major compaction in the current tenant.
obclient> ALTER SYSTEM MAJOR FREEZE; Query OK, 0 rows affectedSuspends the major compaction in the current tenant.
obclient> ALTER SYSTEM SUSPEND MERGE; Query OK, 0 rows affectedResumes the major compaction in the current tenant.
obclient> ALTER SYSTEM RESUME MERGE; Query OK, 0 rows affectedClears the error flag of the major compaction in the current tenant.
obclient> ALTER SYSTEM CLEAR MERGE ERROR; Query OK, 0 rows affected
Minor compaction examples
Initiates a minor compaction in the current tenant.
obclient> ALTER SYSTEM MINOR FREEZE; Query OK, 0 rows affected