Create an ApsaraDB RDS for PostgreSQL instance

更新时间:
复制 MD 格式

You can create an ApsaraDB RDS instance in the Alibaba Cloud console or by calling an API operation. This topic describes how to create an ApsaraDB RDS for PostgreSQL instance in the console.

Prerequisites

  • If you use a RAM user to create an ApsaraDB RDS instance, the RAM user must have the AliyunRDSFullAccess and AliyunBSSOrderAccess permissions. For more information about how to grant permissions, see Grant permissions to a RAM user.

  • To create a pay-as-you-go ApsaraDB RDS instance, your Alibaba Cloud account balance (cash and coupons) must be at least CNY 100.00. For more information about how to top up your account, see Top up your account.

Procedure

  1. Go to the ApsaraDB RDS instance creation page.

  2. Select a Billing Method.

    Billing method

    Recommended for

    Benefits

    Subscription

    For long-term use, select Subscription (one-time payment) and specify a Subscription Duration in the lower-left corner of the page.

    More cost-effective than pay-as-you-go, with greater discounts for longer subscription periods.

    Pay-as-you-go

    For short-term use, select Pay-as-you-go (hourly billing).

    You can first create a Pay-as-you-go instance. After you confirm that the instance meets your requirements, you can convert its billing method to subscription.

    You can release the instance at any time to stop billing.

    Serverless

    A serverless instance provides real-time elasticity for CPU and memory, with compute resources billed on demand. Choose Serverless if your business experiences fluctuating traffic and requires rapid scaling.

    This model replaces fixed resource payments with a true pay-as-you-go approach where resources dynamically match your workload, resulting in significant cost savings.

    Important
  3. Select the Region where you want to create the ApsaraDB RDS instance.

    • If you have purchased an ECS instance and want it to communicate with an RDS instance over the internal network, select the region where the ECS instance is located. Otherwise, the ECS instance can access the RDS instance only over the public network, which prevents optimal performance.

      Important

      You cannot change the region of an ApsaraDB RDS instance after it is created. Choose the region carefully.

    • If you plan to connect to the ApsaraDB RDS instance from a device other than an ECS instance, such as a local computer, choose a region that is geographically close to your device to reduce network latency. You can then connect to the instance using its public endpoint.

  4. Configure the Engine, SLR Authorization, Product Series, Product Type, and Storage Type.

    1. Select a Engine.

      Select PostgreSQL. Then, select a PostgreSQL version based on your requirements.

      Note

      Based on the open source Babelfish for PostgreSQL project, ApsaraDB RDS for PostgreSQL 13, 14, and 15 are compatible with T-SQL syntax. If you need to connect to your ApsaraDB RDS for PostgreSQL database from a SQL Server application or client, we recommend that you select Enable Babelfish. For more information about Babelfish for ApsaraDB RDS for PostgreSQL instances, see Introduction to Babelfish.

    2. Complete the SLR Authorization.

      This one-time authorization is required the first time you create an instance and is free of charge. Click Authorize to grant the AliyunServiceRoleForRdsPgsqlOnEcs service-linked role. This allows the ApsaraDB RDS service to manage elastic network interfaces to establish network links.

    3. Select an Product Series.

      Edition

      Description

      Use cases

      Basic Edition

      A single-node architecture.

      Cost-effective. Suitable for:

      • Personal learning

      • Micro websites

      • Development and testing environments for small to medium-sized enterprises

      Note

      Basic Edition instances have longer recovery and restart times in case of a failure.

      High-availability Edition

      A classic high-availability architecture with one primary node and one secondary node. You can also add read-only nodes to scale read capacity.

      High availability. Suitable for:

      • Production databases for medium to large enterprises

      • Databases for industries such as internet, IoT, retail e-commerce, logistics, and gaming

      Cluster Edition (Recommended)

      One primary node and multiple secondary nodes.

      A multi-node high-availability deployment where secondary nodes are readable. Suitable for:

      • Production databases for medium to large enterprises

      • Internet and new retail industries, automotive manufacturing, and large enterprise ERP systems

      Note
      • The available editions depend on your selected region and database engine.

      • For more information about each edition, see Overview of editions.

    4. Select a Product Type (Standard or Yitian).

      Note
      • This parameter is not available for Basic Edition instances.

      • High-availability Edition and Cluster Edition instances support both Standard and Yitian types. For more information, see Introduction to product types.

    5. Select a Storage Type.

      Feature

      Premium ESSD (Recommended)

      ESSD

      Scalability

      ★★★★★

      • Up to 64,000 GB.

      • No connection transients during storage scaling.

      • Online scaling completed in seconds.

      • Supports auto-scaling.

      ★★★★★

      • Up to 64,000 GB.

      • No connection transients during storage scaling.

      • Online scaling completed in seconds.

      • Supports auto-scaling.

      Performance

      ★★★★★★

      Built on ESSD, Premium ESSD adds capabilities like IO performance bursting, Buffer Pool Extension (BPE), and data archiving.

      ★★★★★

      • PL1 < PL2 < PL3

      • PL2 delivers up to 2x the IOPS and throughput of PL1.

      • PL3 delivers up to 20x the IOPS and 11x the throughput of PL1.

      Backup

      ★★★★★

      • Minute-level or second-level backups.

      • Maximum frequency of once every 15 minutes.

      ★★★★★

      • Minute-level or second-level backups.

      • Maximum frequency of once every 15 minutes.

      Note
  5. Configure the instance network. The Network Type is fixed to VPC.

    1. Select a VPC.

      To connect to the ApsaraDB RDS instance from an ECS instance over the internal network, ensure they are in the same region and use the same VPC.

      Note

      ECS and ApsaraDB RDS instances can communicate over the internal network even if they are in the same VPC but use different vSwitches.

    2. Choose whether to Add to Whitelist the VPC's CIDR block.

      If you add the CIDR block, ECS instances within the same VPC can access the ApsaraDB RDS instance.

      Note

      If you select No here, you can manually configure the whitelist after the instance is created. For more information, see Configure a whitelist.

  6. Select the zone, vSwitch, and Deployment Method for the instance.

    • How to select a zone:

      • There are no significant differences between different zones in the same region.

      • For the lowest network latency, place the ECS instance in the same zone as the ApsaraDB RDS instance. The performance difference between zones in the same region is minimal.

    • How to select a vSwitch:

      Select an existing vSwitch or click Create vSwitch to create a new one. For parameter details, see Create and manage a vSwitch.

    • How to select a deployment method:

      • Multi-zone Deployment (Recommended): The primary and secondary nodes are located in different zones within the same region, providing cross-zone disaster recovery.

        If you select Deployment Method for the Multi-zone Deployment, you must specify the Zone and Network of Primary Node and the Zone and Network of Secondary Node.

      • Single-zone Deployment: The primary and secondary nodes are located in the same zone.

        If you select the Basic Edition, you can only choose Single-zone Deployment.

      Note
      • For instances with primary and secondary nodes, such as High-availability Edition instances, we recommend that you select Multi-zone Deployment to enable cross-zone disaster recovery.

      • If the target zone is marked as Sold Out, select a different zone.

  7. Select an Instance Type.

    1. Select a Category (General-purpose or Dedicated).

      Category

      Description

      Best for

      General-purpose Instance Types

      Dedicated memory and I/O

      Shared CPU and storage

      Workloads that require a balance of performance and cost-effectiveness.

      Dedicated Instance Types

      Dedicated CPU, memory, storage, and I/O

      Note

      Exclusive instance types are the top configuration of dedicated types, providing exclusive access to all CPU, memory, storage, and I/O resources on a physical server.

      Production workloads that require stable and predictable performance.

      Note

      Dedicated instance types are not available for the Basic Edition.

    2. Select the instance specifications, such as the number of CPU cores, memory size, maximum number of connections, and maximum IOPS.

      • Test environment: 2 cores or more.

      • Production environment: We recommend 4 cores or more.

      Note

      For a list of all specifications, see ApsaraDB RDS for PostgreSQL instance types.

  8. Select a Storage Capacity.

    The available storage capacity range depends on the instance type and storage type that you selected. You can adjust the storage capacity in increments of at least 5 GB.

  9. (Optional) If the Billing Method is Subscription , you must also specify a Duration.

    Different subscription durations offer different discounts. You can hover over View Details next to Price to view the fee details.

  10. Configure optional parameters. You can keep the default values if you do not have specific requirements.

    Parameter

    Description

    Port

    The instance port. The value can range from 1000 to 5999. The default is 5432.

    Parameter Template

    You can apply a parameter template when you create an instance. If you do not select one, the default system template is used. You can also select a custom template. For more information about how to create a custom template, see Use a parameter template.

    Release Protection

    If you set Billing Method to Pay-as-you-go, you can enable Release Protection for the instance to prevent accidental deletion. For more information, see Enable or disable release protection for an instance.

    Minor Engine Version Update Policy

    • Set the minor engine version update policy. The default is Automatic Upgrade. If your minor engine version is not the latest, the system periodically schedules a maintenance task to upgrade it. You will be notified of the task by SMS, email, and internal messages. The automatic upgrade is performed within the maintenance window that you specify.

      Note

      After the instance is created, you can go to its Basic Information page to change the update policy. For more information, see Modify the automatic upgrade settings for the minor engine version.

    • Specify the minor engine version for the instance. If you do not select a version, the latest AliPG minor engine version is used.

      Example of a minor version number:

      rds_postgres_1400_20220830_14.4

      The fields are as follows:

      • rds: The instance is an ApsaraDB RDS instance.

      • postgres: The database is PostgreSQL.

      • 1400: The major version of PostgreSQL is 14.

      • 20220830: The AliPG minor engine version. The available versions are displayed on the purchase page. For more information about each minor version, see AliPG minor engine version release notes (PostgreSQL 14 to 18).

      • 14.4: The PostgreSQL community minor version number.

      Note

      In the Basic Resources step, if you select Enable Babelfish, an example of the minor version format for an RDS for PostgreSQL instance is as follows:

      rds_postgres_1400_20220630_babelfish_14.4

    Resource Group

    Select a default or custom resource group to organize and manage your instances.

    Babelfish Migration Mode

    This parameter is available only if you select Enable Babelfish.

    • Babelfish Migration Mode: The data migration mode after you enable Babelfish.

      • single-db: You can create only a single SQL Server database in the Babelfish for PostgreSQL instance, which is created in the regular PostgreSQL schema.

      • multi-db: You can create multiple SQL Server databases. Each database is created in a different PostgreSQL schema (<database_name>_<schema_name>) to avoid name conflicts.

      Note

      For information about how to choose a mode, see Introduction to migration modes.

    • Initial Account: The administrative account for Babelfish, used to access the instance from the TDS port.

      Important

      This is a privileged account and cannot be deleted after it is created.

    • Password: The password for the Babelfish administrative account.

      Note

      You can change the password after the instance is created. For more information, see Reset a password.

    Time Zone

    Instance Name

    A custom name for the instance to make it easy to identify.

    Tags

    If you have a large number of instances, you can add a tag to each instance to categorize and manage them. For more information, see Filter instances by tag.

  11. In the upper-right corner of the page, select the number of instances you want to purchase.

    The default is 1. You can purchase up to 20 instances at a time.

  12. Review your order details, click Confirm Order, and complete the payment. A success message is displayed in the console.

    Note

    For subscription instances, we recommend that you select Enable Auto-renewal to prevent business interruptions from an expired subscription.

    If you purchase by month, the auto-renewal cycle is one month. If you purchase by year, the auto-renewal cycle is one year. The cycle length matches your purchase duration. You can cancel auto-renewal at any time. For more information, see Renew an expired resource and Auto-renewal.

  13. View the instance.

    Go to the Instances page. In the top navigation bar, select the region where the instance is located. Find the newly created instance based on its Creation Time.

    Note

    Instance creation takes about 1 to 10 minutes. You may need to refresh the page to see the new instance.

Next steps

Create an account and a database

FAQ

How do I view the total number of RDS instances in my Alibaba Cloud account?

Log on to the RDS Overview page to view the total number of RDS instances across all database engines in your Alibaba Cloud account. This page also shows the regions where your instances are deployed and the number of running instances in each region.

image

Why can't I find the instance I created in the instance list?

Possible cause

Description

Recommendation

Incorrect region

The currently selected region does not match the region where you created the instance.

Switch to the correct region in the upper-left corner of the page.

Insufficient resources in the availability zone

Instance creation failed due to insufficient resources in the availability zone.

If instance creation fails, you can find the refund order on the Order List page.

Select a different availability zone and try again.

RAM permission policy prohibits the creation of unencrypted RDS instances

A RAM permission policy prevents RAM users from creating unencrypted RDS instances.

  • When a RAM user attempts to create a high-performance local disk instance, the creation fails. This is because disk encryption cannot be enabled for this instance type during creation.

  • If a RAM user attempts to create a cloud disk instance without enabling cloud disk encryption, the creation fails.

For more information, see Use RAM permission policies to restrict RAM user permissions.

Select cloud disk as the storage type, enable cloud disk encryption, set a key, and then try again.

How do I resolve the error The SLR does not exist. The user needs to create an SLR first. that is reported on the purchase page when I create an RDS PostgreSQL instance?

When you create an ApsaraDB RDS for PostgreSQL instance for the first time, you must click the button next to the SLR Authorization parameter to authorize the AliyunServiceRoleForRdsPgsqlOnEcs service-linked role. This one-time authorization is free and allows the ApsaraDB RDS service to manage elastic network interfaces to establish network links.

Related documents