Plan management

更新时间:
复制 MD 格式

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

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select a region.
  3. Find the instance that you want to manage and click the instance ID.
  4. In the left-side navigation pane, click Plan Management.

  5. Click Create Plan.

  6. 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.

      Note

      This parameter is available only when Execute Cycle is set to Single.

      Execution Time

      Select the time to pause or resume the instance.

      Note

      This 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.

      Note

      This 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.

      Note

      This parameter is available only when Execute Cycle is set to Single.

      Execution Time

      Select the time to scale out or scale in the instance.

      Note

      This 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.

      Note

      This 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.

      Note

      This parameter is available only when Execute Cycle is set to Single.

      Execution Time

      Select the time to upgrade or downgrade the instance.

      Note

      This 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.

      Note

      This 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.

  7. Click OK.

    After a scheduled plan is created, its status is running by 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

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select a region.
  3. Find the instance that you want to manage and click the instance ID.
  4. In the left-side navigation pane, click Plan Management.

  5. Find the target plan and click Edit in the Actions column.

  6. In the Edit Plan panel, modify the plan. For more information about the parameters, see Step 6 in Create a scheduled plan.

  7. 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

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select a region.
  3. Find the instance that you want to manage and click the instance ID.
  4. In the left-side navigation pane, click Plan Management.

  5. Find the target plan to disable or enable it.

    To disable a plan, perform the following steps:

    1. Find a scheduled plan whose status is running and click Disable in the Actions column.

    2. In the Disable Plan dialog box, click Disable.

    To enable a plan, perform the following steps:

    1. Find a scheduled plan whose status is canceled and click Enable in the Actions column.

    2. 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

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select a region.
  3. Find the instance that you want to manage and click the instance ID.
  4. In the left-side navigation pane, click Plan Management.

  5. Find the target plan and click Delete in the Actions column.

  6. 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

CreateDBInstancePlan

Creates a scheduled plan.

UpdateDBInstancePlan

Edits a scheduled plan.

DescribeDBInstancePlans

Queries scheduled plans.

SetDBInstancePlanStatus

Disables or enables a scheduled plan.

DeleteDBInstancePlan

Deletes a scheduled plan.