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

Note You are offered a reduced price on your first purchase of an RDS instance. For more information, visit the ApsaraDB RDS promotion page.

Prerequisites

The AliyunRDSFullAccess policy is attached to the RAM user that you use to create an RDS instance. For more information, see Use RAM for resource authorization.

Procedure

  1. Go to the ApsaraDB RDS buy page.
  2. Configure the Billing Method parameter.
    Billing method Description Benefit
    Subscription A subscription instance is an instance for which you pay an upfront fee. If you want to use an instance for a long period of time, we recommend that you select the Subscription billing method. If you select the subscription billing method, configure the Duration parameter in the lower part of the page. In most cases, the subscription billing method is more cost-effective than the pay-as-you-go billing method for long-term usage. Alibaba Cloud provides lower prices for longer subscription periods.
    Pay-As-You-Go You are charged on an hourly basis for a pay-as-you-go instance based on your actual resource usage. If you want to use an instance for a short period of time, we recommend that you select the Pay-As-You-Go billing method.

    You can create a pay-as-you-go RDS instance. After you confirm that the new RDS instance meets your business requirements, you can change the billing method of the RDS instance from pay-as-you-go to subscription.

    You can release a pay-as-you-go RDS instance based on your business requirements. The billing cycle of a pay-as-you-go RDS instance immediately stops after you release the instance.
    Note You can view the price in the lower-right corner of the page. The price is displayed only after you configure all required parameters.
  3. Configure the following parameters.
    Parameter Description
    Regions The region in which the RDS instance resides.

    We recommend that you select the region of the Elastic Compute Service (ECS) instance on which your application is deployed. If the RDS instance and the ECS instance reside in different regions, you cannot connect these instances over an internal network. In this case, these instances cannot deliver optimal performance.

    Note
    • After an RDS instance is created, you cannot change the region of the RDS instance. If you want to connect an ECS instance and an RDS instance over an internal network, make sure that the RDS instance and the ECS instance reside in the same region.
    • For more information about how to view the region of an ECS instance, see Get ready to use ApsaraDB RDS for MySQL.
    • If your application is deployed on an on-premises server or on-premises computer, we recommend that you select a region that is near your on-premises server or on-premises computer. This way, you can use the public endpoint of the RDS instance to connect to the RDS instance from your application.
    Database Engine The database engine and version that are run by the RDS instance. Select PostgreSQL. The supported PostgreSQL versions are 10, 11, 12, 13, and 14.
    Notice ApsaraDB RDS for PostgreSQL provides the Babelfish feature that is developed based on the Babelfish for PostgreSQL open source project. This feature enables your RDS instance that runs PostgreSQL 13 or PostgreSQL 14 to be compatible with Transact-SQL (T-SQL) statements. If you want to connect your SQL Server application or client to an RDS instance that runs PostgreSQL, we recommend that you select Enable Babelfish when you create the RDS instance. For more information, see Introduction to Babelfish.
    Edition
    • Basic: In RDS Basic Edition, the database system consists of only a primary RDS instance. RDS Basic Edition is cost-effective and suitable for learning and testing.
      Note RDS instances that run RDS Basic Edition require a long period of time to restart or recover from faults.
    • High-availability: This is the recommended edition. In RDS High-availability Edition, the database system consists of a primary RDS instance and a secondary RDS instance. These instances work in high availability mode. RDS High-availability Edition is suitable for production environments and more than 80% of business scenarios.
    Note
    Storage Type
    • Local SSD: A local SSD resides on the same host as the database engine. You can store data on local SSDs to reduce I/O latency. Local SSDs are supported only for RDS instances that run PostgreSQL 10.
    • ESSD: Enhanced SSDs (ESSDs) come in three performance levels (PLs).
      • ESSD PL1: This is the basic PL of ESSDs.
      • ESSD PL2: An ESSD of PL2 delivers IOPS and throughput that are approximately twice the IOPS and throughput delivered by an ESSD of PL1.
      • ESSD PL3: An ESSD of PL3 delivers IOPS that is up to 20 times the IOPS delivered by an ESSD of PL1 and up to 11 times the throughput delivered by an ESSD of PL1. ESSDs of PL3 are suitable for business scenarios in which highly concurrent requests must be processed with high I/O performance and at low read and write latencies.
    • Standard SSD: A standard SSD is an elastic block storage device that is designed based on the distributed storage architecture. You can store data on standard SSDs to separate computing from storage.
    Note
    Zone of Primary Node

    Select a zone in which the RDS instance resides.

    Deployment Method
    • Multi-zone Deployment: This is the recommended deployment method. The primary RDS instance and the secondary RDS instance reside in different zones to provide zone-disaster recovery.
    • Single-zone Deployment: The primary RDS instance and the secondary RDS instance reside in the same zone.
    Note
    • No substantive differences exist between the zones in the same region.
    • If the RDS instance resides in the same zone as the ECS instance on which your application is deployed, these instances can deliver optimal performance. If the RDS instance and the ECS instance reside in different zones in the same region, the performance of the RDS instance and the ECS instance is slightly lower than the performance of the RDS instance and the ECS instance that reside in the same zone.
    • If you set the Edition parameter to Basic, only the Single-zone Deployment method is supported.
    • If Sold Out appears in the upper-right corner of a zone name, this zone does not have sufficient resources. In this case, you must switch to another zone.
    Zone of Secondary Node If you set the Deployment Method parameter to Multi-zone Deployment, you must select the zone in which the secondary RDS instance resides.
    Instance Type The instance type of the RDS instance. Before you select an instance type, you must select an instance family.
    • General-purpose: A general-purpose RDS instance exclusively occupies the allocated memory and I/O resources. The RDS instance shares CPU and storage resources with the other general-purpose RDS instances deployed on the same server.
    • Dedicated: A dedicated instance exclusively occupies the allocated CPU, memory, storage, and I/O resources. Dedicated host instance types provide the highest specifications in the dedicated instance family. A dedicated host instance exclusively occupies all the CPU, memory, storage, and I/O resources on the physical host on which the RDS instance is deployed.
    • General-purpose (New): The new general-purpose instance types provide better scalability and higher performance than the old general-purpose instance types. In addition, the period of time that is required to create an RDS instance and the period of time that is required to change the specifications of an RDS instance are reduced. The new general-purpose instance types are in development. Some features of ApsaraDB RDS are not supported for RDS instances that use the new general-purpose instance types. For more information, see Primary ApsaraDB RDS for PostgreSQL instance types.
    Note
    • In a test environment, select an instance type that provides one or more cores.
    • In a production environment, select an instance type that provides four or more cores.
    For more information, see Primary ApsaraDB RDS instance types.
    Capacity The storage capacity that is provided to store data files, system files, binary log files, and transaction files in the RDS instance. The storage capacity varies based on the instance type and storage type that you select. You can adjust the storage capacity at a step size of 5 GB.
    Note
  4. In the lower-right corner of the page, click Next: Instance Configuration.
  5. Configure the VPC and VSwitch parameters. We recommend that you select the same virtual private cloud (VPC) in which your ECS instance resides for your RDS instance. If you select a different VPC for your RDS instance, you cannot connect your RDS instance and ECS instance over an internal network.
    Note
    • For more information about how to view the VPC in which your ECS instance resides, see Get ready to use ApsaraDB RDS for MySQL.
    • You can connect the RDS instance and the ECS instance over an internal network even if the instances use different vSwitches in the same VPC.
  6. Configure more custom parameters. If you do not have special business requirements, you can retain the default values of these parameters.
    Parameter Description
    Release Protection Specifies whether to enable the release protection feature. The release protection feature is used to prevent a pay-as-you-go RDS instance from being released due to unintended operations. For more information, see Enable or disable the release protection feature for an ApsaraDB RDS for MySQL instance.
    Resource Group The resource group to which the RDS instance belongs. You can retain the default resource group or select a custom resource group based on your business requirements.
    Babelfish Migration Mode The migration mode of the RDS instance after Babelfish is enabled. This parameter takes effect only when you select Enable Babelfish in the Basic Configurations step.
    • single-db: You can create only one SQL Server database on an RDS instance for which Babelfish is enabled and create a standard PostgreSQL schema for the database.
    • multi-db: You can create multiple SQL Server databases and create different PostgreSQL schemas for the databases. You must name the schemas in the <Database name>_<Schema name> format to prevent name conflicts.
    Note For more information, see Migration modes.
    Initial Account The username of the Babelfish management account. This parameter takes effect only when you select Enable Babelfish in the Basic Configurations step. The Babelfish management account is used to connect to the RDS instance over the TDS port.
    Notice This account is a privileged account and cannot be deleted after it is created.
    Username requirements:
    • The username must be 2 to 63 characters in length.
    • The username can contain lowercase letters, digits, and underscores (_).
    • The username must start with a lowercase letter and end with a lowercase letter or a digit.
    • The username cannot start with pg.
    • The username cannot contain SQL keywords. For more information, see SQL keywords.
    Password The password of the Babelfish management account. This parameter takes effect only when you select Enable Babelfish in the Basic Configurations step.
    Note You can change the password after the RDS instance is created. For more information, see Reset the password of an account on an ApsaraDB RDS for PostgreSQL instance.
    Password requirements:
    • The password must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • The following special characters are supported: ! @ # $ % ^ & * ( ) _ + - =.
    Time Zone The time zone of the RDS instance.
    Note
    SLR Authorization If this is the first time you purchase a new general-purpose instance type, you must attach the AliyunServiceRoleForRdsPgsqlOnEcs service-linked role to ApsaraDB RDS. This way, your RDS instance can mount Elastic Network Interfaces (ENIs) and establish connections.
    Note
    • SLR authorization is required only when you purchase a new general-purpose instance type for the first time.
    • SLR authorization does not generate fees.
  7. In the lower-right corner of the page, click Next: Confirm Order.
  8. Confirm the configuration of the RDS instance in the Parameters section, configure the Purchase Plan and Duration parameters, read and select Terms of Service, and then click Pay Now. You must configure the Duration parameter only if you select the subscription billing method for the RDS instance.
    Note If you select the subscription billing method for the RDS instance, we recommend that you select Auto-Renew Enabled. This way, you can prevent interruptions on your workloads even if you forget to renew the RDS instance.
  9. View the RDS instance.
    Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance based on the Creation Time parameter.

What to do next

Create a database and an account on an ApsaraDB RDS for PostgreSQL instance

FAQ

Why am I unable to find the RDS instance that I created?

Possible cause Description Suggestion
Incorrect region The RDS instance does not reside in the region that you selected in the top navigation bar of the ApsaraDB RDS console. In the top navigation bar, select the region in which the RDS instance resides.
Insufficient resources The zone that you selected cannot provide sufficient resources.

If the RDS instance cannot be created, you can go to the Orders page in the Billing Management console to view the refunded fee.

Select a different zone and try again.
RAM policies that do not allow users to create unencrypted RDS instances RAM policies that do not allow users to create unencrypted RDS instances are attached to a RAM user.
  • If you use the credentials of the RAM user to create an RDS instance that uses local SSDs, the RDS instance cannot be created. When you create an RDS instance that uses local SSDs, you cannot enable disk encryption.
  • If you use the credentials of the RAM user to create an RDS instance that uses standard SSDs or ESSDs and you do not enable disk encryption for the RDS instance, the RDS instance cannot be created.

For more information, see Use RAM policies to manage the permissions of RAM users on ApsaraDB RDS instances.

When you create an RDS instance, select the standard SSD or ESSD storage type, select Disk Encryption, set the Key parameter, and then try again.

References