You can create an RDS instance in the ApsaraDB RDS 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 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.
Procedure
Select a Billing Method.
Billing method
Use case
Benefits
Subscription
Long-term workloads. Select Subscription (one-time payment) and specify a Subscription Duration.
Cost-effective. Offers significant discounts for longer commitments.
Pay-as-you-go
Short-term usage, testing, or unpredictable workloads. 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 change its billing method to subscription.
Flexible. Billed hourly. You can release the instance at any time to stop charges.
Serverless
For scenarios that require scheduled tasks, have fluctuating workloads, are fully managed, or need to be completely O&M-free, select Serverless.
It breaks the fixed resource payment model and implements a pay-as-you-go model where resources are dynamically matched to workloads. This can save significant costs.
ImportantFor more information about Serverless and how to create a Serverless instance, see Create an ApsaraDB RDS for PostgreSQL Serverless instance.
You can view the price in the lower-right corner of the page. The final price is displayed after you complete the following configuration steps.
Select the Region where you want to create the RDS instance.
We recommend that you create the RDS instance in the same region as your ECS instance. If they are in different regions, the ECS instance can access the RDS instance only over the internet, which prevents optimal performance.
ImportantYou cannot change the region of an RDS instance after it is created. Be sure to select the correct region.
If you want to connect to the RDS instance from a device other than an ECS instance, such as a local server or a computer, create the RDS instance in a region that is close to the device. This reduces network latency. You can then connect to the RDS instance using its public endpoint.
Select a Databse Engine, complete the SLR Authorization, and then select an Edition, Product Type, and Storage Type.
Select an Engine.
Select PostgreSQL. Select the PostgreSQL version that you require.
NoteRDS for PostgreSQL (versions 15) supports T-SQL syntax via open-source Babelfish integration. Select Enable Babelfish to allow SQL Server applications and clients to connect directly to this instance. For details, Introduction to Babelfish.
Complete SLR Authorization.
Click Authorize to grant the
AliyunServiceRoleForRdsPgsqlOnEcsservice-linked role. This one-time, free authorization enables RDS to manage Elastic Network Interfaces (ENIs) for network connectivity.Select an Edition.
Edition
Architecture
Use case
Basic Edition
Single node.
Cost-effective. Suitable for:
Personal learning.
Microsites.
Dev/Test environments or non-critical workloads.
NoteIt takes longer recovery time during failures.
High-availability Edition
One primary + One secondary. A classic high-availability architecture. You can add read-only nodes.
High availability. Suitable for:
Production environments for medium and large enterprises.
Industries such as the Internet, IoT, retail e-commerce, logistics, and gaming.
Cluster Edition (Recommended)
One primary + Multiple secondary nodes. The secondary node is accessible for read operations.
Workloads requiring HA and read-scaling. Suitable for:
Production environments for medium and large enterprises.
Industries such as new retailing, automobile manufacturing, and large enterprise ERP systems.
NoteThe available editions depend on the region and database engine you select.
For more information about each edition, see Overview of editions.
Select a Product Type (Standard or Yitian).
NoteThis configuration is not applicable to Basic Edition.
High-availability Edition and Cluster Edition instances support Standard and Yitian. For more information, see Introduction to product types.
Select a Storage Type.
Feature
Premium ESSD (Recommended)
ESSD
Scalability
★★★★★
Capacity: Up to 64,000 GB.
Stability: No connection transients during storage scale-out.
Speed: Online upgrade and scale-out completed in seconds.
Automation: Supports automatic storage expansion.
★★★★★
Capacity: Up to 64,000 GB.
Stability: No connection transients during storage scale-out.
Speed: Online upgrade and scale-out completed in seconds.
Automation: Supports automatic storage expansion.
Performance
★★★★★★
Built on the ESSD architecture, this type integrates advanced features including IO performance burst, Buffer Pool Extension (BPE), 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 backup.
Maximum frequency of once every 15 minutes.
★★★★★
Minute-level or second-level backup.
Maximum frequency of once every 15 minutes.
NoteThe supported storage types depend on the product type and edition you select.
For ESSD and Premium ESSD, you can select Cloud Disk Encryption to encrypt your data. For more information, see Disk encryption.
For Premium ESSD, you can also enable IO performance burst, Buffer Pool Extension (BPE), and data archiving. For more information, see Premium ESSD.
For more information, see Introduction to storage types.
Configure the network for the instance. The Network Type is set to VPC.
Select a VPC.
If you want to connect to the RDS instance from an ECS instance over an internal network, ensure that they are in the same region and use the same VPC.
NoteAn ECS instance and an RDS instance can communicate over the internal network even if they are in the same VPC but use different vSwitches.
Select whether to Add to Whitelist.
If you add the CIDR block, ECS instances in the same VPC can access the RDS instance.
NoteIf you select No, 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.
Zone:
Performance differences between zones in the same region are negligible.
Colocate your ECS and RDS instances in the same zone to minimize network latency, though cross-zone latency is negligible for most workloads.
vSwitch
Select an existing vSwitch or click Create VSwitch to create one. For more information, see Create and manage a vSwitch.
Deployment Method
Multi-zone Deployment (Recommended): The primary and secondary nodes are in different zones within the same region. This provides cross-zone disaster recovery.
If you set Deployment Method to Multi-zone Deployment, you must select the Zone and Network of Primary Node and the Zone and Network of Secondary Node.
Single-zone Deployment: Co-locates both nodes in the same zone.
Basic Edition supports Single-zone Deployment only.
NoteFor instances with primary and secondary nodes, select Multi-zone Deployment to enable cross-zone disaster recovery.
If Sold Out is displayed in the upper-right corner of the target zone, select a different zone.
Select an Instance Type.
Select a Category (General-purpose or Dedicated).
Category
Characteristics
Best for
General-purpose Instance Types
Dedicated: memory and I/O
Shared: CPU and storage
Balanced workloads requiring cost-efficiency.
Dedicated Instance Types
Dedicated: CPU, memory, storage, and I/O
NoteResources are reserved exclusively for your instance.
Production workloads requiring consistent, predictable performance.
NoteNot available for the Basic Edition.
Select a specific instance type (number of CPU cores, memory, maximum connections, and maximum IOPS).
For a test environment, we recommend an instance type with 2 CPU cores or more.
For a production environment, we recommend an instance type with 4 CPU cores or more.
NoteFor a list of instance types, see ApsaraDB RDS for PostgreSQL instance types.
Select a Storage Capacity capacity.
Storage limits are determined by the selected instance and storage types. Capacity must be provisioned in 5 GB increments.
Optional. If you set the Billing Method parameter to Subscription, configure a Subscription Duration. Discounts vary by subscription duration. Hover over View Details next to the cost for a pricing breakdown.
Configure other custom parameters. If you do not have special requirements, you can use the default values.
Parameter
Description
Port
You can initialize the port when you create an ApsaraDB RDS for PostgreSQL instance. The value can be from 1000 to 5999. The default value is 5432.
Parameter Template
You can specify a parameter template when you create an ApsaraDB RDS for PostgreSQL instance. If you do not select a template, the default system template is used. You can set this to 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 pay-as-you-go instance to prevent it from being accidentally released. For more information, see Enable or disable instance release protection.
Minor Engine Version Update Policy
You can set the minor version upgrade policy when you create an ApsaraDB RDS for PostgreSQL instance. The default value is Automatic Upgrade. If the minor engine version of your instance is earlier than the latest minor engine version, the system periodically sends proactive O&M tasks to upgrade the minor engine version. You will be notified of the tasks by email, and internal message. The automatic upgrade is performed within the maintenance window that you specify.
NoteAfter the instance is created, you can go to the Basic Information page of the instance to modify the minor version upgrade policy. For more information, see Modify the automatic upgrade settings.
You can specify the minor engine version when you create an ApsaraDB RDS for PostgreSQL instance. If you do not specify a version, the latest AliPG minor engine version is used.
The following is an example of a minor version number:
rds_postgres_1400_20220830_14.4The fields are described as follows:
rds: RDS instance.postgres: PostgreSQL database.1400: The major version of PostgreSQL is 14.20220830: The AliPG minor engine version. The supported engine versions are subject to what is displayed on the purchase page. For more information about each minor version, see AliPG minor engine version release notes (PostgreSQL 14 to 17).14.4: The PostgreSQL community minor version number.
NoteIf you select Enable Babelfish in the Basic Resources step, the following is an example of the minor version number of the ApsaraDB RDS for PostgreSQL instance:
rds_postgres_1400_20220630_babelfish_14.4
Resource Group
Select a default or custom resource group to facilitate instance management.
Babelfish Migration Mode
You need to configure the following parameters 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, and it is created in the regular PostgreSQL mode.
multi-db: You can create multiple SQL Server databases. Each database is created in a different PostgreSQL mode (<database_name>_<schema_name>) to avoid name conflicts.
NoteFor information about how to select a mode, see Introduction to migration modes.
Initial Account: Configure the Babelfish management account, which is used to access the RDS instance from the TDS port.
ImportantThis is a privileged account and cannot be deleted after it is created.
Password: The password for the Babelfish management account.
NoteYou can change the password after the instance is created. For more information, see Reset the password.
Time Zone
You can select a time zone when you purchase a primary instance. You cannot select a time zone for a read-only instance. A read-only instance inherits the time zone of its primary instance.
Named time zones are supported, but UTC 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 configure this parameter, the system selects a default time zone based on the region where you purchase 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
Customize the instance name for easy identification.
Tags
If you have many instances, you can attach tags to them for classification and management. For more information, see Filter instances by tag.
Privileged Account
You can create a privileged account when you create an ApsaraDB RDS for PostgreSQL instance. If you select Configure Later, you can manually create the account after the instance is created.
NoteFor more information about privileged accounts and how to manually create one, see Create a database and an account.
In the upper-right corner of the page, set the number of instances to purchase.
The default value is 1. You can purchase up to 20 instances at a time.
Review the order information, quantity, and subscription duration (for subscription instances only). Click Confirm Order, and then complete the payment. A message is displayed in the console indicating that the instance is successfully created.
NoteFor subscription instances, we recommend that you Enable Auto-renewal to prevent business interruptions caused by an expired subscription.
Auto-renewal aligns with the subscription term (monthly or yearly) and can be disabled at any time. For details, 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 instance that you created based on its Creation Time.
NoteIt takes 1 to 10 minutes to create the instance. You may need to refresh the page to view the instance.
What to do next
FAQ
References
Create an RDS instance by calling an API operation: CreateDBInstance
To create other types of instances, see:
