This topic describes how to control the execution of background tasks for the custom hot and cold storage strategy by using SQL statements, including suspending, resuming, and manually triggering the tasks.
Suspend or resume background cache tasks
OceanBase Database provides the suspend_storage_cache_task parameter to specify whether to suspend background cache tasks. Valid values:
True: Suspends (pauses) all ongoing and newly initiated cache tasks.False: Does not suspend background cache tasks, which resumes suspended cache tasks.
For more information about this parameter, see suspend_storage_cache_task.
Examples
Execute the following command to suspend all hot cache tasks in the tenant.
obclient> ALTER SYSTEM SET suspend_storage_cache_task = true;Execute the following command to resume all suspended hot cache tasks in the tenant.
obclient> ALTER SYSTEM SET suspend_storage_cache_task = false;
Manually trigger a hot data caching task
After the custom hot and cold storage strategy is enabled, you can execute the following SQL statement to manually trigger the execution of a hot data caching task:
ALTER SYSTEM TRIGGER STORAGE_CACHE_POLICY_EXECUTOR;
Examples
Execute the following command to manually trigger the execution of a hot cache task.
obclient> ALTER SYSTEM TRIGGER STORAGE_CACHE_POLICY_EXECUTOR;
References
- For information about how to view the real-time status and details of hot cache tasks, see V$OB_STORAGE_CACHE_TASKS.
- For more information about the custom hot and cold storage strategy, see Overview of the custom hot and cold storage strategy.
