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
AliyunRDSFullAccessandAliyunBSSOrderAccesspermissions. 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
-
Go to the ApsaraDB RDS instance creation page.
-
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-
If you need to create a serverless instance, see Create an ApsaraDB RDS for PostgreSQL serverless instance.
-
An estimated price is displayed in the lower-right corner of the page. The final price is calculated after you complete the configuration.
-
-
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.
ImportantYou 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.
-
-
Configure the Engine, SLR Authorization, Product Series, Product Type, and Storage Type.
-
Select a Engine.
Select PostgreSQL. Then, select a PostgreSQL version based on your requirements.
NoteBased 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.
-
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
AliyunServiceRoleForRdsPgsqlOnEcsservice-linked role. This allows the ApsaraDB RDS service to manage elastic network interfaces to establish network links. -
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
NoteBasic 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.
-
-
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.
-
-
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-
The available storage types depend on the instance type and edition that you select.
-
If you select an instance with ESSD or Premium ESSD storage, you can select Disk Encryption to further protect your data. For more information, see Disk encryption.
-
If you select Premium ESSD, you can also manually enable IO performance bursting, Buffer Pool Extension (BPE), and data archiving. For more information, see Premium ESSD.
-
For more information, see Storage types.
-
-
-
Configure the instance network. The Network Type is fixed to VPC.
-
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.
NoteECS and ApsaraDB RDS instances can communicate over the internal network even if they are in the same VPC but use different vSwitches.
-
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.
NoteIf you select No here, you can manually configure the whitelist after the instance is created. For more information, see Configure a whitelist.
-
-
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.
-
-
-
Select an Instance Type.
-
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
NoteExclusive 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.
NoteDedicated instance types are not available for the Basic Edition.
-
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.
NoteFor a list of all specifications, see ApsaraDB RDS for PostgreSQL instance types.
-
-
-
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.
-
(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.
-
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.
NoteAfter 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.4The 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.
NoteIn 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.
NoteFor 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.
ImportantThis is a privileged account and cannot be deleted after it is created.
-
Password: The password for the Babelfish administrative account.
NoteYou can change the password after the instance is created. For more information, see Reset a password.
Time Zone
-
You can select a time zone when you create a primary instance. You cannot select a time zone for a read-only instance, as it inherits the time zone of its primary instance.
-
Named time zones are supported, but UTC offset time zones are not. For more information about named time zones, see List of common named time zones for ApsaraDB RDS for PostgreSQL instances.
-
If you do not set this parameter, the system selects a default time zone based on the region where you create the instance. For information about the mappings between regions and default named time zones, see Mappings between regions and default named time zones for ApsaraDB RDS for PostgreSQL instances.
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.
-
-
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.
-
Review your order details, click Confirm Order, and complete the payment. A success message is displayed in the console.
NoteFor 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.
-
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.
NoteInstance creation takes about 1 to 10 minutes. You may need to refresh the page to see the new instance.
Next steps
FAQ
Related documents
-
To create an ApsaraDB RDS instance by using the API, see CreateDBInstance.
-
Video tutorial: Create an ApsaraDB RDS instance
-
To create other types of instances, see the following topics:
