This topic describes how to use a parameter template to configure the parameters of multiple ApsaraDB RDS for PostgreSQL instances at a time. ApsaraDB RDS for PostgreSQL provides system parameter templates and custom parameter templates.
Prerequisites
The RDS instances meet the following requirements:
The RDS instance uses standard SSDs or enhanced SSDs (ESSDs).
The RDS instance runs PostgreSQL 10 or later.
Background information
ApsaraDB RDS for PostgreSQL supports the following types of parameter templates:
System parameter template: the default parameter template that is used when you create an RDS instance.
Custom parameter template: the parameter template that you configure based on your business requirements after you create an RDS instance. You can apply a custom parameter template to one or more RDS instances to overwrite the parameter settings that are configured by using the system parameter template.
For more information about how to configure a single parameter, see Modify instance parameters.
Create a custom parameter template
Manually create a template
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select the region in which the RDS instance resides.
On the page that appears, click Create Parameter Template.
Configure the following parameters.
Parameter
Description
Template Name
Enter a template name. The name must be 8 to 64 characters in length and can contain letters, digits, periods (.), and underscores (_). The name must start with a letter.
Database Engine
Select PostgreSQL.
Engine Version
Select the version of the database engine that is run by the RDS instance. The RDS instance runs PostgreSQL 10 or later.
Description
Enter a description for the parameter template. The description can be up to 200 characters in length.
Add Parameter
Click Add Parameter and select a parameter from the Parameter drop-down list. Then, you can configure the parameter. You can also view the valid values and default value of the parameter.
NoteFor more information about the available parameters, see the parameters on the Modifiable Parameters tab of the Parameters page.
If you want to add another parameter, you must click Add Parameter again.
To delete a parameter, you can click Delete to the right of the parameter.
Import
After you export a parameter template to your computer, you can edit the parameter template based on your business requirements. Then, you can click Import to copy the parameter settings from the parameter template. For more information about how to export a parameter template, see Modify instance parameters.
Click OK.
Export the existing parameter settings as a parameter template
- 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 Modifiable Parameters tab, click Export as Template.
In the dialog box that appears, configure the Template Name and Description parameters.
Parameter
Description
Template Name
Enter a template name. The name must be 8 to 64 characters in length and can contain letters, digits, periods (.), and underscores (_). The name must start with a letter.
Description
Enter a description for the parameter template. The description can be up to 200 characters in length.
Click OK.
To view the parameter template that is exported, you can perform the following operations: Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select the region in which the RDS instance resides.
Apply a parameter template
Apply a parameter template during instance creation
If you select the enhanced SSD (ESSD) storage type when you create an RDS instance, you can specify a parameter template for the RDS instance. For more information about how to create an RDS instance, see Create an ApsaraDB RDS for PostgreSQL instance.
System parameter template: ApsaraDB RDS for PostgreSQL provides system parameter templates by default. A system parameter template is named in the following format:
PostgreSQL_Major engine version_RDS edition_Default parameter template
. Example:PostgreSQL_14.0_ High-availability Edition_Default parameter template
. For more information about the parameter settings in a system parameter template, see View a parameter template.Custom parameter template: You can select a custom parameter template that is created before you create an RDS instance. If you do not create a custom parameter template before you create an RDS instance, you can click the create a custom parameter template link below the Parameter Template drop-down list to create one and then select the created template for the RDS instance. For more information about how to create a custom parameter template, see Create a custom parameter template.
System parameter templates cannot be modified.
Apply a parameter template to multiple RDS instances
Before you apply a parameter template to multiple RDS instances, you must verify that the parameter settings are suitable for all the RDS instances.
The modification of some parameters triggers a restart of your RDS instance. After you modify the parameters, your RDS instance immediately restarts. To check whether the modification of a parameter triggers a restart, you need to log on to the ApsaraDB RDS console, go to the Modifiable Parameters tab, and then view the value in the Force Restart column for the parameter. If the value is Yes, the modification of the parameter triggers a restart. If the value is No, the modification of the parameter does not trigger a restart. If the RDS instance restarts, your application is disconnected from the RDS instance. Make sure that your application is configured to reconnect to your RDS instance. To minimize the impacts, we recommend that you arrange your business before you restart the RDS instance. Proceed with caution.
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select the region in which the RDS instance resides.
On the Custom Parameter Templates or System Parameter Templates tab, find the parameter template that you want to apply and click Apply to Instances in the Actions column.
NoteIf multiple parameter templates are applied to your RDS instance in sequence, the most recent parameter template that is applied to your RDS instance overwrites the parameter settings that are configured by using previous parameter templates.
In the Available Instances section of the panel that appears, select the RDS instances to which you want to apply the parameter template, click the icon to move the selected RDS instances to the Selected Instances section, and then view the changes of the parameter settings in the Parameter Comparison section.
Click OK.
Apply a parameter template to an RDS instance
The modification of some parameters triggers a restart of your RDS instance. After you modify the parameters, your RDS instance immediately restarts. To check whether the modification of a parameter triggers a restart, you need to log on to the ApsaraDB RDS console, go to the Modifiable Parameters tab, open the Apply Template dialog box, and then view the value of the Force Restart parameter. If the value is Yes, the modification of the parameter triggers a restart. If the value is No, the modification of the parameter does not trigger a restart. If the RDS instance restarts, your application is disconnected from the RDS instance. Make sure that your application is configured to reconnect to your RDS instance. To minimize the impacts, we recommend that you arrange your business before you restart the RDS instance. Proceed with caution.
- 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 Modifiable Parameters tab, click Apply Template.
In the dialog box that appears, configure the Template Name parameter.
NoteYou can log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select the region in which the RDS instance resides to view the template that is created.
Click OK.
Manage parameter templates
Clone a custom parameter template
If you want to clone a custom parameter template from the current region to another region or you want to modify the parameter settings of a custom parameter template, you can use the parameter template cloning feature.
System parameter templates cannot be cloned.
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select the region in which the RDS instance resides.
On the Custom Parameter Templates tab of the page that appears, find the parameter template that you want to clone, click the icon in the Actions column, and then select Clone.
Configure the following parameters.
Parameter
Description
Region and Zone
Specify the destination region to which you want to clone the parameter template.
Template Name
Enter a template name. The name must be 8 to 64 characters in length and can contain letters, digits, periods (.), and underscores (_). The name must start with a letter.
Description
Enter a description for the parameter template. The description 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 the region in which the RDS instance resides.
On the Custom Parameter Templates or System Parameter Templates tab, click the ID of the parameter template that you want to use to view the parameter settings in the parameter template.
Modify a parameter template
You can modify a custom parameter template.
After you modify a custom parameter template, you must re-apply the parameter template for the modification to take effect. If you modify a custom parameter template and the modification takes effect only after the RDS instance is restarted, you must restart the RDS instance after the custom parameter template is modified. The instance restart causes a disconnection of your application from your RDS instance. Make sure that your application is configured to reconnect to your RDS instance. To minimize the impacts, we recommend that you arrange your business before you restart the RDS instance. Proceed with caution.
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select the region in which the RDS instance resides.
On the Custom Parameter Templates tab of the page that appears, find the parameter template that you want to modify, click the icon in the Actions column, and then select Modify.
Click OK.
Delete a parameter template
You can delete a custom parameter template.
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select the region in which the RDS instance resides.
On the Custom Parameter Templates tab of the page that appears, find the parameter template that you want to delete, click the icon in the Actions column, and then select Delete.
In the message that appears, click OK.
NoteIf a parameter template that you want to delete is applied to one or more RDS instances, the template cannot be directly deleted.
For example, if
Custom Parameter Template 1
is applied toInstance A
andInstance B
,Custom Parameter Template 1
cannot be directly deleted. You can delete Custom Parameter Template 1 only after you apply another parameter template toInstance A
andInstance B
.
Related operations
Operation | Description |
Creates a parameter template. | |
Modifies a parameter template. | |
Clones a parameter template from one region to another region. | |
Queries the parameter templates that are available in a region. | |
Queries the details about a parameter template. | |
Deletes a parameter template. |
FAQ
How do I reset the parameter values in a custom parameter template to their default values?
Find the parameter that you want to modify in the custom parameter template and change the specified value to the default value. For more information, see Modify a parameter template.
Re-apply the custom parameter template to your RDS instance. For more information, see Apply a parameter template.