To manage parameters for multiple ApsaraDB RDS for PostgreSQL instances, use parameter templates to quickly apply a standard configuration. Parameter templates are categorized into system parameter templates and custom parameter templates.
Prerequisites
The ApsaraDB RDS for PostgreSQL instance uses cloud disks.
Background information
ApsaraDB RDS for PostgreSQL provides the following types of parameter templates:
-
System parameter template: The default parameter template that is used when you create an ApsaraDB RDS for PostgreSQL instance.
-
Custom parameter template: After you create an instance, you can create a custom parameter template based on your business requirements and apply it to one or more ApsaraDB RDS for PostgreSQL instances to override the system parameter template.
To modify a parameter for a single instance, see Modify the parameters of an ApsaraDB RDS for PostgreSQL instance.
Create a custom parameter template
Create a parameter template manually
-
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select a region.
-
Click Create Parameter Template.
-
Configure the following parameters.
Parameter
Description
Template Name
The name of the template. The name must be 8 to 64 characters in length, start with a letter, and can contain only letters, digits, periods (.), and underscores (_). Chinese characters are not allowed.
Database Engine
Select PostgreSQL.
Engine Version
Select a database version.
Description
Enter a description for the template, which can be up to 200 characters in length.
Add Parameter
Click Add Parameter to add a row where you can select a Parameter Name and set its value. You can also view information such as the valid value range and the default value.
Note-
For a list of available parameters, see the Editable Parameters tab on the Parameters page of your instance.
-
To configure another parameter, click Add Parameter again.
-
To remove a parameter, click Delete on the right side of the parameter.
Import
After you modify an exported template, you can click Import and paste the parameters to create a template. For more information about how to export a template, see Modify the parameters of an ApsaraDB RDS for PostgreSQL instance.
-
-
Click Confirm.
Apply a parameter template
Apply a parameter template during instance creation
When you create an instance that uses cloud disks, you can apply a parameter template. For more information about how to create an instance, see Create an ApsaraDB RDS for PostgreSQL instance.
-
Select a system parameter template: ApsaraDB RDS for PostgreSQL provides a default parameter template. The naming convention is
PostgreSQL_<Major version number>_<Edition>_default parameter template, for example,PostgreSQL_14.0_High-availability Edition_default parameter template. To view the parameter settings of a system parameter template, see View a parameter template. -
Select a custom parameter template: You can create a custom parameter template in advance, or click the create a custom parameter template link in the Parameter Templates section to go to the creation page. For more information about how to create a custom parameter template, see Create a custom parameter template.
You cannot modify system parameter templates.
Apply a parameter template to multiple instances
-
Before applying a parameter template, ensure that its parameters are suitable for all target instances.
-
Some parameter modifications restart the instance immediately upon application. For more information, see the Restart Required? column in the parameter template. An instance restart interrupts active connections, so plan for this downtime accordingly.
-
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select a region.
-
On the Custom Parameter Templates or System Parameter Templates tab, find the template that you want to apply and click Apply to Instance in the Actions column.
NoteIf you apply multiple templates to an instance in sequence, the last applied template overrides the parameters of the previous ones.
-
From the instance list on the left, select the target instances. Click
to move the instances to the right. Review the Parameter Comparison section to verify the changes. -
Click OK.
Apply a parameter template to a single instance
Some parameter modifications restart the instance immediately upon application. For more information, see the description for Restart Required? in the Apply Template confirmation dialog box. An instance restart interrupts active connections, so plan for this downtime accordingly.
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
-
In the left-side navigation pane, click Parameters.
-
On the Editable Parameters tab, click Apply Template.
-
Select the Template Name of a template that you want to apply.
NoteYou can log on to the ApsaraDB RDS console, click Parameter Templates in the left-side navigation pane, and then select a region to view the created templates.
-
Click OK to apply the template.
Manage parameter templates
Clone a custom parameter template
You can clone a custom parameter template to copy it to another region or to create a new template based on an existing one.
You can clone custom parameter templates. You cannot clone system parameter templates.
-
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select a region.
-
In the list of custom parameter templates, find the template that you want to clone. In the Actions column, click
and select Clone. -
Configure the following parameters.
Parameter
Description
Region
The destination region to which you want to clone the template.
Template Name
The name of the template. The name must be 8 to 64 characters in length, start with a letter, and can contain only letters, digits, periods (.), and underscores (_). Chinese characters are not allowed.
Description
Enter a description for the template, which can be up to 200 characters in length.
-
Click OK.
View a parameter template
-
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select a region.
-
On the Custom Parameter Templates or System Parameter Templates tab, click the ID of the target parameter template to view its parameter settings.
Modify a parameter template
You can modify a custom parameter template that you created.
After you modify a custom parameter template, you must reapply the template for the changes to take effect. If a modified parameter requires an instance restart, the instance restarts, interrupting active connections. Plan for this downtime accordingly.
-
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select a region.
-
Find the target custom parameter template. In the Actions column, click
and select Modify. -
After you complete the modifications, click OK.
Delete a parameter template
You can delete a custom parameter template that you created.
-
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select a region.
-
Find the target custom parameter template. In the Actions column, click
and select Delete. -
In the confirmation dialog box that appears, click OK.
NoteYou cannot delete a custom parameter template if it is applied to one or more instances.
For example, if
custom_template_1is applied toinstance_Aandinstance_B, you cannot deletecustom_template_1. To delete the template, you must first apply a different template toinstance_Aandinstance_B.
Related APIs
|
API |
Description |
|
Creates a parameter template. |
|
|
Modifies a parameter template. |
|
|
Clones a parameter template to the current region or another region. |
|
|
Queries a list of parameter templates in a specified region. |
|
|
Queries the details of a specified parameter template. |
|
|
Deletes a parameter template. |
FAQ
Q: How do I reset a parameter in a custom parameter template to its default value?
A:
-
In the custom parameter template, find the target parameter and change its value to the default value. For more information, see Modify a parameter template.
-
Reapply the parameter template to the target instance. For more information, see Apply a parameter template.