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