This topic describes how to create an AnalyticDB for PostgreSQL instance in the console.

Prerequisites

An Alibaba Cloud account is created. If you do not have an Alibaba Cloud account, visit the Alibaba Cloud official website to create an account.

Create a service-linked role

The first time you use AnalyticDB for PostgreSQL, you must create a service-linked role in the console.

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-right corner, click Create Instance.
  3. In the Create Service Linked Role message, click OK.

Create an instance

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-right corner, click Create Instance to go to the buy page.
  3. Configure the Product Type parameter. Valid values:
    • Subscription : You must pay a subscription fee when you create an instance. For long-term usage, the subscription billing method is more cost-effective than the pay-as-you-go billing method. You are charged lower prices for longer subscription periods.
    • Pay-as-you-go: You are charged on an hourly basis for the resources that you use. For short-term use, we recommend that you select the pay-as-you-go billing method. If you no longer need a pay-as-you-go instance, you can release the instance to reduce costs.
    Note You can change the billing method of an instance from pay-as-you-go to subscription. However, you cannot change the billing method from subscription to pay-as-you-go. For more information, see Switch between billing methods.
  4. Configure the parameters that are described in the following table.
    ParameterDescription
    Region and Zone

    The region where you want to create the instance.

    Note
    • After you complete the purchase, you cannot change the region of the instance. To accelerate access to the instance, we recommend that you select a region that is close to your geographical location.
    • Make sure that the AnalyticDB for PostgreSQL instance is deployed in the same region as the Elastic Compute Service (ECS) instance to which you want to connect. Otherwise, you cannot connect these instances over an internal network. In this case, these instances cannot deliver the optimal performance.

    The zone where you want to create the instance. Each zone is an independent physical location within a region. Zones in the same region do not have substantial differences.

    You can create the instance in the same zone as the ECS instance to which you want to connect or in a different zone.

    Instance Resource TypeThe resource type of the instance. Valid values:
    • Serverless: You can specify only the required computing resources without the need to reserve storage resources.
    • Elastic Storage Mode: You can add nodes or increase your storage capacity.
    Note The resource types that are available vary based on the region and zone. If the current region and zone do not provide your required instance resource type, change the region and zone.

    For more information about the resource types that are available in different regions and zones, see Instance specifications.

    Serverless ModeThe scheduling mode for the instance in Serverless mode. Valid values:
    • Manual Scheduling: You can perform manual resource orchestration based on your business requirements. For example, you can manually pause and resume the instance and perform time-specific scaling. For more information, see Manually pause and resume an instance and Manage plans.
    • Automatic Scheduling: The instance can be automatically paused and resumed based on traffic. If no traffic occurs, the instance automatically changes to the idle state. You are not charged for computing resources when the instance is in the idle state.
    Note This parameter is available only for instances in Serverless mode.
    Maximum ACUsThe number of maximum AnalyticDB Compute Units (ACUs) for the instance in automatic Serverless mode. Valid values: 8 to 32, in 8 increments.

    An ACU is the unit of computing resources for AnalyticDB for PostgreSQL instances in automatic Serverless mode. If your instance fails to meet computing performance requirements, you can manually modify the value of this parameter. For more information, see Configure instance resources.

    Note This parameter is available only for instances in automatic Serverless mode.
    EditionThe edition of the instance. Valid values: High-availability and High Performance (Basic Edition).
    Note You can select High Performance (Basic Edition) only if you set Instance Resource Type to Elastic Storage Mode. For more information, see Basic Edition.
    Compute Node SpecificationsThe specifications of compute nodes. The available specifications vary based on the resource type and edition. For more information, see Instance specifications.
    Note This parameter is unavailable for instances in automatic Serverless mode.
    NodesThe number of compute nodes. The instance performance increases with the number of compute nodes. The number of compute nodes that you can select varies based on the resource type and edition.
    • Serverless

      Valid values if Edition is set to High-availability: 2 to 512, in 2 increments.

    • Elastic Storage Mode
      • Valid values if Edition is set to High-availability: 4 to 512, in 4 increments.
      • Valid values if Edition is set to High Performance (Basic Edition): 2 to 512, in 2 increments.
    Note This parameter is unavailable for instances in automatic Serverless mode.
    Storage Disk TypeThe storage type. The available storage types vary based on the resource type and edition.
    • Serverless: You do not need to select a storage type.
    • Elastic Storage Mode
      • High-availability: You can select Enhanced SSD (ESSD) or Ultra Disk.
      • High Performance (Basic Edition): You can select only Enhanced SSD (ESSD).
    Note This parameter is unavailable for instances in automatic Serverless mode.
    Encryption TypeThe encryption type of the instance. You can select Not Encrypted or Disk Encryption.
    Note This parameter is available only if you set Instance Resource Type to Elastic Storage Mode. Disk encryption is not supported for instances in Serverless mode.
    CMKThe encryption key of disks.

    This parameter is available only if you select Elastic Storage Mode and Disk Encryption.

    Single Node Storage CapacityThe storage capacity of each node in the instance. Valid values: 50 to 6000. Unit: GB. The value must be a multiple of 50.
    Note This parameter is available only if you set Instance Resource Type to Elastic Storage Mode.
    Network TypeThe network type of the instance. It is automatically set to VPC.
    VPCThe virtual private cloud (VPC) in which the instance resides.

    A VPC is an isolated virtual network that provides higher security and higher performance than the classic network. Before you configure this parameter, make sure that a VPC and a vSwitch are created in the region where you want to create the instance. For more information, see Create and manage a VPC.

    vSwitchThe vSwitch to which the instance is connected.
    Resource GroupThe resource group to which the instance belongs. For more information about resource groups, see What is Resource Management?
    Sample DataSpecifies whether to load sample data to the instance. For more information about the sample dataset, see Manage the sample dataset.
    DurationThe subscription period of the instance.
    Note This parameter is available only if you set Product Type to Subscription.
  5. Click Buy Now.
  6. On the Confirm Order page, perform the following operations based on the value of the Product Type parameter:
    • Subscription
      1. Confirm the information in the Parameters section, read and select Terms of Service, and then click Pay.
      2. On the Purchase page, click Subscribe.
    • Pay-as-you-go

      Confirm the information in the Parameters section, read and select Terms of Service, and then click Activate Now.

  7. After the instance is created, go to the Instances page to view the instance.
    Note It takes a period of time to initialize an AnalyticDB for PostgreSQL instance. You can perform operations only when the instance is in the Running state.

Related operations

OperationDescription
CreateDBInstanceCreates an AnalyticDB for PostgreSQL instance.