Plan management
AnalyticDB for PostgreSQL supports scheduled plans forPause and Resume Instance, Change Instance Specifications, and Change Specifications. You can customize resource plans based on a time dimension.
Usage notes
-
This feature is available only for pay-as-you-go instances.
-
Change Instance Specifications and Change Specifications may cause a brief service interruption. Schedule these tasks during off-peak hours.
-
Change Instance Specifications and Change Specifications change the price of your instance. For pricing details, see Pricing.
Create a scheduled plan
Create a scheduled plan to periodically pause, resume, or scale an instance.
The supported plan types depend on the instance resource type.
|
Instance resource type |
Pause and resume |
Scaling |
Change node specifications |
|
elastic storage mode |
Supported |
Not supported |
Supported |
|
serverless mode |
Supported |
Supported |
Not supported |
Procedure
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select a region.
- Find the instance that you want to manage and click the instance ID.
-
In the left-side navigation pane, click Plan Management.
-
Click Create Plan.
-
In the Create Plan panel, configure the plan.
The following scheduled task types are available:Pause and Resume Instance, Change Instance Specifications, and Change Specifications. Configure each type as follows:
-
Pause and Resume Instance
Parameter
Description
Plan Name
The name of the scheduled plan.
Plan Description
An optional description of the scheduled plan.
Plan Type
Select Pause/Resume Instance.
Execute Cycle
Select Single or Periodic.
Important-
If you select Single, take note of the following limitations:
-
You can schedule a plan to run only within the next 30 days.
-
Schedule the new plan at least 30 minutes before or after any existing plan.
-
-
If you select Periodic, take note of the following limitations:
-
You can only create one plan of the same Plan Type. For example, if an instance already has a recurring pause and resume plan, you cannot create a second recurring pause and resume plan.
-
Schedule the new plan at least 30 minutes before or after any existing plan.
-
Operation
Select Pause or Resume.
NoteThis parameter is available only when Execute Cycle is set to Single.
Execution Time
Select the time to pause or resume the instance.
NoteThis parameter is available only when Execute Cycle is set to Single.
Time Range
Select a Start Time and an End Time for the plan.
If you omit the start and end times, the scheduled plan starts immediately and runs indefinitely.
NoteThis parameter is available only when Execute Cycle is set to Periodic.
Pause
Enter the pause time as a cron expression in UTC.
Note-
This parameter is available only when Execute Cycle is set to Periodic.
-
For information about cron expressions, see Cron expressions.
Resume
Enter the resume time as a cron expression in UTC.
Note-
This parameter is available only when Execute Cycle is set to Periodic.
-
For information about cron expressions, see Cron expressions.
-
-
Change Instance Specifications
Parameter
Description
Plan Name
The name of the scheduled plan.
Plan Description
An optional description of the scheduled plan.
Plan Type
Select Change Instance Specifications.
Execute Cycle
Select Single or Periodic.
Important-
If you select Single, take note of the following limitations:
-
You can schedule a plan to run only within the next 30 days.
-
Schedule the new plan at least 30 minutes before or after any existing plan.
-
-
If you select Periodic, take note of the following limitations:
-
You can only create one plan of the same Plan Type. For example, if an instance already has a recurring pause and resume plan, you cannot create a second recurring pause and resume plan.
-
Schedule the new plan at least 30 minutes before or after any existing plan.
-
Operation
Select Scale Out or Scale In.
NoteThis parameter is available only when Execute Cycle is set to Single.
Execution Time
Select the time to scale out or scale in the instance.
NoteThis parameter is available only when Execute Cycle is set to Single.
Desired Nodes
Enter the target number of compute nodes.
Time Range
Select a Start Time and an End Time for the plan.
If you omit the start and end times, the scheduled plan starts immediately and runs indefinitely.
NoteThis parameter is available only when Execute Cycle is set to Periodic.
Scale Out
Enter the scale out time as a cron expression in UTC.
Note-
This parameter is available only when Execute Cycle is set to Periodic.
-
For information about cron expressions, see Cron expressions.
Scale In
Enter the scale in time as a cron expression in UTC.
Note-
This parameter is available only when Execute Cycle is set to Periodic.
-
For information about cron expressions, see Cron expressions.
-
-
Change Specifications
Parameter
Description
Plan Name
The name of the scheduled plan.
Plan Description
An optional description of the scheduled plan.
Plan Type
Select Change Specifications.
Execute Cycle
Select Single or Periodic.
Important-
If you select Single, take note of the following limitations:
-
You can schedule a plan to run only within the next 30 days.
-
Schedule the new plan at least 30 minutes before or after any existing plan.
-
-
If you select Periodic, take note of the following limitations:
-
You can only create one plan of the same Plan Type. For example, if an instance already has a recurring pause and resume plan, you cannot create a second recurring pause and resume plan.
-
Schedule the new plan at least 30 minutes before or after any existing plan.
-
Operation
Select Upgrade or Downgrade.
NoteThis parameter is available only when Execute Cycle is set to Single.
Execution Time
Select the time to upgrade or downgrade the instance.
NoteThis parameter is available only when Execute Cycle is set to Single.
Specifications
Select the target compute node specifications.
Time Range
Select a Start Time and an End Time for the plan.
If you omit the start and end times, the scheduled plan starts immediately and runs indefinitely.
NoteThis parameter is available only when Execute Cycle is set to Periodic.
Upgrade
Enter the upgrade time as a cron expression in UTC.
Note-
This parameter is available only when Execute Cycle is set to Periodic.
-
For information about cron expressions, see Cron expressions.
Downgrade
Enter the downgrade time as a cron expression in UTC.
Note-
This parameter is available only when Execute Cycle is set to Periodic.
-
For information about cron expressions, see Cron expressions.
-
-
-
Click OK.
After a scheduled plan is created, its status is
runningby default.
Edit a scheduled plan
Edit a scheduled plan to adjust its settings.
Usage notes
-
You can edit only scheduled plans whose Plan Status is Running.
-
Editing a scheduled plan does not affect previously executed tasks.
Procedure
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select a region.
- Find the instance that you want to manage and click the instance ID.
-
In the left-side navigation pane, click Plan Management.
-
Find the target plan and click Edit in the Actions column.
-
In the Edit Plan panel, modify the plan. For more information about the parameters, see Step 6 in Create a scheduled plan.
-
Click OK.
Disable or enable a scheduled plan
Disable a scheduled plan that you temporarily do not need, and re-enable it when needed.
Usage notes
-
You can disable only scheduled plans whose Plan Status is Running.
-
You can enable only scheduled plans whose Plan Status is Canceled.
Procedure
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select a region.
- Find the instance that you want to manage and click the instance ID.
-
In the left-side navigation pane, click Plan Management.
-
Find the target plan to disable or enable it.
To disable a plan, perform the following steps:
-
Find a scheduled plan whose status is running and click Disable in the Actions column.
-
In the Disable Plan dialog box, click Disable.
To enable a plan, perform the following steps:
-
Find a scheduled plan whose status is canceled and click Enable in the Actions column.
-
In the Enable Plan dialog box, click Enable.
-
Delete a scheduled plan
Delete a scheduled plan that you no longer need.
Usage notes
-
Deleted plans cannot be restored.
-
Deleting a scheduled plan does not affect previously executed tasks.
Procedure
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select a region.
- Find the instance that you want to manage and click the instance ID.
-
In the left-side navigation pane, click Plan Management.
-
Find the target plan and click Delete in the Actions column.
-
In the Delete Plan dialog box, click Delete.
FAQ
When two scheduled tasks overlap, the system resolves conflicts as follows.
|
Initial state (Task A) |
New task (Task B) |
Resolution |
|
A pause task is running. The instance is in the Pausing state. |
Pause task |
Task B fails. No notification is sent. |
|
A pause task is running. The instance is in the Pausing state. |
Resume task |
Task B waits for the pause task to complete and then resumes the instance. |
|
A pause task is running. The instance is in the Pausing state. |
Scaling task |
Task B fails. A notification is sent to the event center. |
|
A resume task is running. The instance is in the Resuming state. |
Pause task |
Task B fails. A notification is sent to the event center. |
|
A resume task is running. The instance is in the Resuming state. |
Resume task |
Task B fails. No notification is sent. |
|
A resume task is running. The instance is in the Resuming state. |
Scaling task |
Task B fails. A notification is sent to the event center. |
|
A scaling task is running. The instance is in the Scaling state. |
Pause task |
Task B waits for the scaling task to complete and then pauses the instance. |
|
A scaling task is running. The instance is in the Scaling state. |
Resume task |
Task B fails. A notification is sent to the event center. |
|
A scaling task is running. The instance is in the Scaling state. |
Scaling task |
Task B fails. A notification is sent to the event center. |
Related APIs
|
API |
Description |
|
Creates a scheduled plan. |
|
|
Edits a scheduled plan. |
|
|
Queries scheduled plans. |
|
|
Disables or enables a scheduled plan. |
|
|
Deletes a scheduled plan. |