You can create an ApsaraDB RDS for PostgreSQL instance in the ApsaraDB RDS console or by calling an API operation. This topic describes how to create an RDS instance in the ApsaraDB RDS console.
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
Step 1: Basic Configurations
- Go to the ApsaraDB RDS buy page.
- Configure the Billing Method parameter.
Billing method Description Benefit Subscription A subscription RDS instance is an instance for which you pay an upfront fee. If you want to use an RDS 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. For long-term use, the subscription billing method is more cost-effective than the pay-as-you-go billing method. You are offered lower prices for longer subscription periods. Pay-as-you-go You are charged an hourly fee for a pay-as-you-go RDS instance based on your actual resource usage. If you want to use an RDS 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 RDS instance that you created 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. - Configure the Region parameter. The region in which you want to create the RDS instance. 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 the 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.
- If your application is deployed on an on-premises server or computer, we recommend that you select a region that is near your on-premises server or computer. This way, you can use the public endpoint of the RDS instance to connect to the RDS instance from your application.
- Configure the Database Engine, Edition, Architecture, and Storage Type parameters.
- Select a zone in which the RDS instance resides.Then, configure the Deployment Method parameter.
- Select a zone.
- No significant 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 the 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.
- Select a 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 cross-zone disaster recovery.
If you select Multi-zone Deployment for the Deployment Method parameter, you must configure the Zone of Primary Node and Zone of Secondary Node parameters.
- Single-zone Deployment: The primary RDS instance and the secondary RDS instance reside in the same zone.
If you set Edition to Basic, only the Single-zone Deployment method is available.
Note- If your database system consists of primary and secondary RDS instances, we recommend that you select Multi-zone Deployment to implement cross-zone disaster recovery.
- If Sold Out appears in the upper-right corner of a zone name, this zone does not have sufficient resources. Switch to another zone.
- Multi-zone Deployment: This is the recommended deployment method. The primary RDS instance and the secondary RDS instance reside in different zones to provide cross-zone disaster recovery.
- Select a zone.
- Configure the Instance Type parameter.
- Configure the Category parameter. You can select General-purpose or Dedicated.
Instance family Description Benefit General-purpose A general-purpose RDS instance occupies all the allocated memory and I/O resources. A general-purpose RDS instance shares CPU and storage resources with other general-purpose RDS instances that are deployed on the same host.
General-purpose RDS instances are cost-effective. Dedicated A dedicated RDS instance occupies all the allocated CPU, memory, storage, and I/O resources. Note The dedicated host instance family is the highest configuration of the dedicated instance family. A dedicated host RDS instance occupies all CPU, memory, storage, and I/O resources of the host on which the RDS instance is deployed.A dedicated RDS instance provides higher performance and higher stability. Note An RDS instance that runs RDS Basic Edition does not support the dedicated instance family. - Configure detailed specifications, such as the number of CPU cores, memory capacity, maximum number of connections, and maximum IOPS.
- For a test environment, we recommend that you select an instance type that provides two or more CPU cores.
- For a production environment, we recommend that you select an instance type that provides four or more CPU cores.
Note For more information, see Primary ApsaraDB RDS instance types.
- Configure the Category parameter. You can select General-purpose or Dedicated.
- Configure the Capacity parameter. The valid values of the Capacity parameter vary based on the values of the Storage Type and Instance Type parameters that you specify. You can adjust the storage capacity at a step size of 5 GB.
- Optional. If you set Billing Method to Subscription, configure the Duration parameter based on your business requirements.
- In the lower-right corner of the page, click Next:Instance Configuration.
Step 2: Instance Configuration
- Configure the Network Type parameter.
- Configure the Parameter Template parameter. If you set Storage Type to ESSD PL1, ESSD PL2, or ESSD PL3, you can specify a parameter template when you create an RDS instance. If you do not specify a parameter template, the default system parameter template is used. You can create a custom parameter template. For more information, see Use a parameter template to configure the parameters of ApsaraDB RDS for PostgreSQL instances.
- Configure the Release Protection parameter. If you set Billing Method to Pay-As-You-Go, you can enable Release Protection for the RDS instance to prevent the 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 PostgreSQL instance.
- Configure the Minor Version Upgrade Policy parameter. The policy that is used to update the minor engine version of the RDS instance. You can select a minor engine version when you create the RDS instance. If you do not select a minor engine version, the latest version of AliPG is used by default.Example:
The following list describes the fields in the preceding example:rds_postgres_1400_20220830_14.4
rds
: RDS instance.postgres
: PostgreSQL database.1400
: the major version of PostgreSQL, which is 14 in this example.20220830
: the version of AliPG. You can select 20220130 or later. For more information, see Release notes for AliSQL.14.4
: the minor version of PostgreSQL, which is 14.4 in this example.
Note If you select Enable Babelfish in the Basic Configurations step, the minor engine version of the RDS instance is displayed in the following format:rds_postgres_1400_20220630_babelfish_14.4
- If your RDS instance runs PostgreSQL 13, you can select the AliPG version of 20220228 or later.
- If your RDS instance runs PostgreSQL 14, you can select the AliPG version of 20220630 or later.
- Configure the Resource Group parameter. Use the default resource group or select a custom resource group based on your business requirements.
- Optional. Configure the Babelfish-related parameters. The following parameters take effect only when you select Enable Babelfish in the Basic Configurations step.
- Babelfish Migration Mode: the migration mode for the RDS instance for which Babelfish is enabled.
- 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 that is used to connect to the RDS instance over the TDS port. Important This account is a privileged account and cannot be deleted after it is created.
- Password: the password of the Babelfish management account. 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.
- Babelfish Migration Mode: the migration mode for the RDS instance for which Babelfish is enabled.
- Configure the Time Zone parameter.
- You can configure the time zone when you create a primary RDS instance. You cannot configure the time zone when you create a read-only RDS instance. A read-only RDS instance inherits the time zone of its primary RDS instance.
- You can configure this parameter only when the RDS instance uses standard SSDs or ESSDs.
- The time zone is not in UTC. For more information, see Common time zones for ApsaraDB RDS for MySQL instances and ApsaraDB RDS for PostgreSQL instances.
- If you do not configure this parameter, the system assigns the default time zone of the region in which the RDS instance resides to the RDS instance. For more information about the mappings between regions and time zones, see Default time zones for ApsaraDB RDS for PostgreSQL instances.
- Configure the SLR Authorization parameter. If this is the first time you create an RDS instance after October 10, 2022, you must create the AliyunServiceRoleForRdsPgsqlOnEcs service-linked role (SLR) for ApsaraDB RDS for PostgreSQL. This way, your RDS instance can mount Elastic Network Interfaces (ENIs) and establish network 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.
- For information about SLR authorization, see [Notice] SLR authorization is required to create an ApsaraDB RDS for PostgreSQL instance from October 10, 2022.
- Configure the Privileged Account parameter. You can create a privileged account when you create an RDS instance. If you select Later, you can create a privileged account after the RDS instance is created.Note For more information about privileged accounts and how to create privileged accounts, see Create a database and an account on an ApsaraDB RDS for PostgreSQL instance.
- In the lower-right corner of the page, click Next:Confirm Order.
Step 3: Confirm Order
- 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 when 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.
- View the new 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.Note ApsaraDB RDS requires 1 to 10 minutes to create an RDS instance. You can refresh the page to view the new RDS instance.
What to do next
Create a database and an account on an ApsaraDB RDS for PostgreSQL instanceFAQ
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, select the region in which the RDS instance resides. Then, you can find the RDS instance. |
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 fees. | We recommend that you 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 RAM users.
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 Key, and then try again. |
References
- For more information about how to create an RDS instance by calling an API operation, see Create an instance.
- For more information about how to create an RDS instance that runs a different database engine, see the following topics: