You can create a Global Active Database instance group to enable cross-region disaster recovery for an ApsaraDB RDS for PostgreSQL instance. This topic describes how to create and delete a Global Active Database instance group.
Requirements
When you create a Global Active Database instance group, you must add an existing ApsaraDB RDS for PostgreSQL instance that meets the following requirements as the primary instance. If you do not have a qualified instance, you can create an ApsaraDB RDS for PostgreSQL instance beforehand.
-
Billing method: Both subscription and pay-as-you-go.
-
RDS edition: Both Basic Edition and High-availability Edition.
-
Engine version: RDS PostgreSQL 11 or later.
-
Instance type:
-
Dedicated: 4 cores and 8 GB of memory or higher.
-
General-purpose: 2 cores and 4 GB of memory or higher.
-
-
Region: The following regions are supported: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Shenzhen), China (Hohhot), China (Heyuan), and China (Chengdu).
If this is your first time using Global Active Database, you must authorize Data Transmission Service (DTS) to access your cloud resources before you create an instance group. For more information, see Authorize DTS to access cloud resources.
Considerations
-
An ApsaraDB RDS for PostgreSQL instance can join only one Global Active Database instance group, either as a primary instance or a secondary instance.
-
A Global Active Database instance group has exactly one primary instance and one secondary instance.
Billing
Global Active Database fees consist of charges for new ApsaraDB RDS instances and DTS data synchronization. No additional instance fees are incurred if you use an existing instance, but you are charged if you purchase a new one. For more information, see Billing.
Create an instance group
From the Global Active Database page
-
Go to the Global Active Database page and click Create Instance Group.
-
On the Create Global Active Database Instance Group page, configure the following parameters:
Parameter
Description
Instance group name
A name that reflects the group's business purpose makes it easier to identify.
The name must be 2 to 126 characters long. It must start with a letter or a Chinese character and can contain digits, underscores (_), and hyphens (-).
Database instance type
Select PostgreSQL.
Instance group type
Select an instance group type. Only Disaster Recovery is supported.
This type is for cross-region disaster recovery and disaster recovery drills. It uses one-way data synchronization from the primary to the secondary instance.
Region of primary instance
This parameter defaults to the region selected in the ApsaraDB RDS for PostgreSQL console. To select a different region, change the region at the top of the console.
Primary instance
From the drop-down list, select the ApsaraDB RDS for PostgreSQL instance to use as the primary instance.
If no eligible primary instance is available, click Create Primary Instance to open the instance purchase page and create one.
-
Click OK.
Your new instance group appears on the instance group list page. You can then add a secondary instance to it.
From the Basic Information page
-
Go to the RDS Instances page, select a region at the top of the page, and then click the ID of the ApsaraDB RDS for PostgreSQL instance that you want to use as the primary instance.
-
On the Basic Information page, in the Instance Distribution section, click Add next to Disaster Recovery Instance.
The system automatically creates a Global Active Database instance group using the current instance as the primary instance, and the Add Secondary Instance page opens to display the new group's information.
NoteIf the target ApsaraDB RDS for PostgreSQL instance is already the primary instance of a Global Active Database instance group, the system does not create a new instance group.
-
On the Add Secondary Instance page, refer to Method 1: Create a new instance and add it as a secondary instance.
NoteTo add an existing instance as the secondary instance, close this page and follow Method 2: Add an existing instance as a secondary instance.
Delete an instance group
-
You can delete an instance group only when it contains a primary instance but no secondary instance.
-
Deleting an instance group and releasing or unsubscribing from a primary instance are two different operations:
-
Delete an instance group: This action deletes only the instance group. The primary instance is unaffected and continues to run with all its data intact.
-
Release or unsubscribe from a primary instance: You must first delete the instance group before you can release or unsubscribe from the primary instance. After the instance is released or unsubscribed from, it is moved to the recycle bin and permanently deleted when its retention period expires.
-
-
If a pay-as-you-go primary instance has overdue payments, its service is suspended. If a subscription primary instance is not renewed upon expiration, it is moved to the recycle bin. In either case, the system removes all instances from the instance group and releases the DTS link. The secondary instance then becomes a standalone read/write instance.
-
Go to the Global Active Database page.
-
For the instance group you want to delete, click Delete in the Actions column.
NoteIf the Delete button is grayed out, the instance group still contains a secondary instance. Remove the secondary instance first, and then delete the instance group.
-
Read the notes in the dialog box, and then click OK to delete the instance group.