AnalyticDB for PostgreSQL provides the plan management feature for you to pause and resume an instance, change the number of compute nodes, and change node specifications. You can schedule plans by time range.
Precautions
- The plan management feature is supported only for pay-as-you-go instances.
- If a plan is scheduled to change the number of compute nodes or change node specifications, transient connections may occur. We recommend that you set the execution time to off-peak hours.
- The operations of changing the number of compute nodes and changing node specifications change the instance price. For more information about the price changes, see Pricing.
Create a plan
If you need to pause and resume an instance or scale an instance on a regular basis, you can create a plan.
The following table describes the plan types supported by different instance resource types.
Instance resource type | Pause and resume an instance | Change the number of compute nodes | 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 the region where the instance resides.
- Find the instance that you want to manage and click its ID.
- In the left-side navigation pane, click Plan Management
- On the page that appears, click Create Plan.
- In the Create Plan panel, configure parameters for a plan. The following tables describe the parameters used to schedule plans for pausing and resuming an instance, changing the number of compute nodes, and changing node specifications.
- Pause and resume an instance
Parameter Description Plan Name The name of the plan. Plan Description The description of the plan. This parameter is optional. Plan Type The type of the plan. Select Pause and Resume Instance. Execution Type The execution type of the plan. Select Later or Periodic. Important- If the execution type is Later, take note of the following items:
- You can schedule plans to take effect only within the next 30 days.
- The execution time of a new plan cannot be within 30 minutes before or after that of an existing plan.
- If the execution type is Periodic, take note of the following items:
- Only a single plan is allowed for each plan type. For example, if your instance has been configured with a periodic pause and resume plan, you cannot create another periodic pause and resume plan.
- The execution time of a new plan cannot be within 30 minutes before or after that of an existing plan.
Operation The operation of the plan. Select Pause or Resume. Note This parameter is available only when the Execution Type parameter is set to Later.Execution Time The time to pause or resume the instance. Note This parameter is available only when the Execution Type parameter is set to Later.Time Range The start time and end time to pause and resume the instance. If this parameter is left unspecified, the operation starts immediately and continues until it is manually stopped.
Note This parameter is available only when the Execution Type parameter is set to Periodic.Pause The time to pause the instance. Specify the time in the cron expression format. The time must be in UTC. Note- This parameter is available only when the Execution Type parameter is set to Periodic.
- For more information about cron expressions, see Cron expressions.
Resume The time to resume the instance. Specify the time in the cron expression format. The time must be in UTC. Note- This parameter is available only when the Execution Type parameter is set to Periodic.
- For more information about cron expressions, see Cron expressions.
- If the execution type is Later, take note of the following items:
- Change the number of compute nodes
Parameter Description Plan Name The name of the plan. Plan Description The description of the plan. This parameter is optional. Plan Type The type of the plan. Select Change Instance Specifications. Execution Type The execution type of the plan. Select Later or Periodic. Important- If the execution type is Later, take note of the following items:
- You can schedule plans to take effect only within the next 30 days.
- The execution time of a new plan cannot be within 30 minutes before or after that of an existing plan.
- If the execution type is Periodic, take note of the following items:
- Only a single plan is allowed for each plan type. For example, if your instance has been configured with a periodic pause and resume plan, you cannot create another periodic pause and resume plan.
- The execution time of a new plan cannot be within 30 minutes before or after that of an existing plan.
Operation The operation of the plan. Select Scale Out or Scale In. Note This parameter is available only when the Execution Type parameter is set to Later.Execution Time The time to scale out or scale in the instance. Note This parameter is available only when the Execution Type parameter is set to Later.Desired Nodes The number of compute nodes after you scale out or scale in the instance. Time Range The start time and end time to change the number of compute nodes. If this parameter is left unspecified, the operation starts immediately and continues until it is manually stopped.
Note This parameter is available only when the Execution Type parameter is set to Periodic.Scale Out The time to scale out the instance. Specify the time in the cron expression format. The time must be in UTC. Note- This parameter is available only when the Execution Type parameter is set to Periodic.
- For more information about cron expressions, see Cron expressions.
Scale In The time to scale in the instance. Specify the time in the cron expression format. The time must be in UTC. Note- This parameter is available only when the Execution Type parameter is set to Periodic.
- For more information about cron expressions, see Cron expressions.
- If the execution type is Later, take note of the following items:
- Change node specifications
Parameter Description Plan Name The name of the plan. Plan Description The description of the plan. This parameter is optional. Plan Type The type of the plan. Select Change Specifications. Execution Type The execution type of the plan. Select Later or Periodic. Important- If the execution type is Later, take note of the following items:
- You can schedule plans to take effect only within the next 30 days.
- The execution time of a new plan cannot be within 30 minutes before or after that of an existing plan.
- If the execution type is Periodic, take note of the following items:
- Only a single plan is allowed for each plan type. For example, if your instance has been configured with a periodic pause and resume plan, you cannot create another periodic pause and resume plan.
- The execution time of a new plan cannot be within 30 minutes before or after that of an existing plan.
Operation The operation of the plan. Select Upgrade or Downgrade. Note This parameter is available only when the Execution Type parameter is set to Later.Execution Time The time to upgrade or downgrade the instance. Note This parameter is available only when the Execution Type parameter is set to Later.Specifications The specifications of compute nodes after you upgrade or downgrade the instance. Time Range The start time and end time to change node specifications. If this parameter is left unspecified, the operation starts immediately and continues until it is manually stopped.
Note This parameter is available only when the Execution Type parameter is set to Periodic.Upgrade The time to upgrade the instance. Specify the time in the cron expression format. The time must be in UTC. Note- This parameter is available only when the Execution Type parameter is set to Periodic.
- For more information about cron expressions, see Cron expressions.
Downgrade The time to downgrade the instance. Specify the time in the cron expression format. The time must be in UTC. Note- This parameter is available only when the Execution Type parameter is set to Periodic.
- For more information about cron expressions, see Cron expressions.
- If the execution type is Later, take note of the following items:
- Pause and resume an instance
- Click OK. After a plan is created, the plan immediately enters the running state.
Edit a plan
You can edit a plan.
Precautions
- Only the plans in the running state can be edited.
- If a plan is edited, tasks that have already been executed are not affected.
Procedure
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select the region where the instance resides.
- Find the instance that you want to manage and click its ID.
- In the left-side navigation pane, click Plan Management
- Find the plan that you want to edit and click Edit in the Actions column.
- In the Edit Plan panel, modify parameters of the plan. For more information about the parameters, see Step 6 in the "Create a plan" section of this topic.
- Click OK.
Disable or enable a plan
If you want to temporarily pause a plan, you can disable the plan. If you want to resume using the plan, you can enable the plan.
Precautions
- Only the plans in the running state can be disabled.
- Only the plans in the canceled state can be enabled.
Procedure
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select the region where the instance resides.
- Find the instance that you want to manage and click its ID.
- In the left-side navigation pane, click Plan Management
- Disable or enable a plan. To disable a plan, perform the following steps:
- Find a plan in the running state and click Disable in the Actions column.
- In the Disable Plan message, click Disable.
To enable a plan, perform the following steps:- Find a plan in the canceled state and click Enable in the Actions column.
- In the Enable Plan message, click Enable.
Delete a plan
If you no longer need a plan, you can delete the plan.
Precautions
- Deleted plans cannot be restored.
- If a plan is deleted, tasks that have already been executed are not affected.
Procedure
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select the region where the instance resides.
- Find the instance that you want to manage and click its ID.
- In the left-side navigation pane, click Plan Management
- Find the plan that you want to delete and click Delete in the Actions column.
- In the Delete Plan message, click Delete.
Troubleshooting
The following table describes the system solutions for conflicts between two plan tasks.
Started task (task A) | Task to be started (task B) | Solution |
---|---|---|
A pausing task has started. The instance is in the pausing state. | Pausing task | Task B fails. The system does not send notifications. |
A pausing task has started. The instance is in the pausing state. | Resuming task | Task B waits for the pausing task to complete and then starts to resume the instance. |
A pausing task has started. The instance is in the pausing state. | Scaling task | Task B fails. The system sends a notification to the event center. |
A resuming task has started. The instance is in the resuming state. | Pausing task | Task B fails. The system sends a notification to the event center. |
A resuming task has started. The instance is in the resuming state. | Resuming task | Task B fails. The system does not send notifications. |
A resuming task has started. The instance is in the resuming state. | Scaling task | Task B fails. The system sends a notification to the event center. |
A scaling task has started. The instance is in the scaling state. | Pausing task | Task B waits for the scaling task to complete and then starts to pause the instance. |
A scaling task has started. The instance is in the scaling state. | Resuming task | Task B fails. The system sends a notification to the event center. |
A scaling task has started. The instance is in the scaling state. | Scaling task | Task B fails. The system sends a notification to the event center. |
Related operations
Operation | Description |
---|---|
CreateDBInstancePlan | Creates a plan. |
UpdateDBInstancePlan | Edits a plan. |
DescribeDBInstancePlans | Queries a plan. |
SetDBInstancePlanStatus | Disables or enables a plan. |
DeleteDBInstancePlan | Deletes a plan. |