A parameter template is a reusable collection of parameter settings that you can apply to one or more ApsaraDB RDS for PostgreSQL instances at a time. Instead of configuring each instance individually, create a template once and apply it across your fleet.
ApsaraDB RDS for PostgreSQL supports two types of parameter templates:
System parameter template: The default template applied when you create an RDS instance. Named in the format
PostgreSQL_<major engine version>_<RDS edition>_Default parameter template, for example,PostgreSQL_14.0_ High-availability Edition_Default parameter template. System parameter templates cannot be modified or cloned.Custom parameter template: A template you create based on your business requirements. Apply it to one or more instances to overwrite the parameter settings from the system parameter template.
To configure parameters for a single instance without using a template, see Modify instance parameters.
Prerequisites
Before you begin, make sure your RDS instances meet the following requirements:
Storage type: standard SSD or enhanced SSD (ESSD)
Database engine: PostgreSQL 10 or later
Understand parameter restart behavior
Some parameters require an instance restart to take effect. Before you apply or modify a template, check the Force Restart column on the Modifiable Parameters tab:
| Force Restart value | Behavior |
|---|---|
| Yes | The instance restarts immediately after the template is applied. Your application loses its connection to the instance. Configure your application to reconnect automatically, and schedule the operation during a maintenance window. |
| No | The change takes effect without a restart. |
When you apply a template to multiple instances, verify that the restart behavior is acceptable for all target instances before proceeding.
Create a custom parameter template
Create a template manually
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select the region.
Click Create Parameter Template.
Configure the following parameters.
Available parameters are listed on the Modifiable Parameters tab of the instance's Parameters page.
Parameter Description Template Name Enter a name of 8 to 64 characters. Allowed characters: letters, digits, periods ( .), and underscores (_). The name must start with a letter.Database Engine Select PostgreSQL. Engine Version Select the PostgreSQL engine version. Must be PostgreSQL 10 or later. Description (Optional) Enter a description of up to 200 characters. Add Parameter Click Add Parameter, select a parameter from the Parameter drop-down list, and set its value. Valid values and the default value are shown inline. To add another parameter, click Add Parameter again. To remove a parameter, click Delete to its right. Import To reuse exported parameter settings, click Import and paste the exported content. For information on exporting, see Modify instance parameters. Click OK.
Export a template from an existing instance
Export the current parameter settings of an instance as a named template, then apply it to other instances.
Go to the Instances page. In the top navigation bar, select the region, find the target instance, and click its ID.
In the left-side navigation pane, click Parameters.
On the Modifiable Parameters tab, click Export as Template.

Configure the following parameters.
Parameter Description Template Name Enter a name of 8 to 64 characters. Allowed characters: letters, digits, periods ( .), and underscores (_). The name must start with a letter.Description (Optional) Enter a description of up to 200 characters. Click OK.
To view the exported template, click Parameter Templates in the left-side navigation pane and select the region in the top navigation bar.
Apply a parameter template
Apply a template when creating an instance
This option is only available when you select the enhanced SSD (ESSD) storage type during instance creation.
When creating an RDS instance with the ESSD storage type, you can specify a parameter template during creation.
System parameter template: Selected by default. Named in the format
PostgreSQL_<major engine version>_<RDS edition>_Default parameter template.Custom parameter template: Select a custom template from the Parameter Template drop-down list. If you haven't created a custom template yet, click the create a custom parameter template link below the drop-down list.
For instance creation steps, see Create an ApsaraDB RDS for PostgreSQL instance.
Apply a template to multiple instances
Before applying a template to multiple instances, verify that the parameter settings are appropriate for all target instances. Parameters with Force Restart = Yes trigger an immediate restart on each instance, disconnecting applications. See Understand parameter restart behavior.
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select the region.
On the Custom Parameter Templates or System Parameter Templates tab, find the template and click Apply to Instances in the Actions column.
If you apply multiple templates to an instance in sequence, the most recently applied template overwrites all previous parameter settings.
In the panel that appears, select the target instances from the Available Instances section, then click the
icon to move them to the Selected Instances section. Review the changes in the Parameter Comparison section.Click OK.
Apply a template to a single instance
Parameters with Force Restart = Yes trigger an immediate restart after the template is applied, disconnecting your application. See Understand parameter restart behavior.
Go to the Instances page. In the top navigation bar, select the region, find the target instance, and click its ID.
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.
To view available templates, click Parameter Templates in the left-side navigation pane.
Click OK.
Manage parameter templates
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.
On the Custom Parameter Templates or System Parameter Templates tab, click the template ID to view its parameter settings.
Modify a custom parameter template
Only custom parameter templates can be modified. After modifying a template, re-apply it to each instance for the changes to take effect.
If any modified parameter has Force Restart = Yes, the instance restarts when you re-apply the template, disconnecting your application. See Understand parameter restart behavior.
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select the region.
On the Custom Parameter Templates tab, find the template, click the
icon in the Actions column, and select Modify.Update the parameter settings and click OK.
Clone a custom parameter template
Clone a custom template to copy it to another region or to create a modified version.
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.
On the Custom Parameter Templates tab, find the template, click the
icon in the Actions column, and select Clone.Configure the following parameters.
Parameter Description Region and Zone Select the destination region for the cloned template. Template Name Enter a name of 8 to 64 characters. Allowed characters: letters, digits, periods ( .), and underscores (_). The name must start with a letter.Description (Optional) Enter a description of up to 200 characters. Click OK.
Delete a custom parameter template
Only custom parameter templates can be deleted. If a template is currently applied to one or more instances, it cannot be deleted directly. Apply a different template to those instances first, then delete the original template. For example, ifCustom Parameter Template 1is applied toInstance AandInstance B, apply another template to both instances before deletingCustom Parameter Template 1.
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Parameter Templates. In the top navigation bar, select the region.
On the Custom Parameter Templates tab, find the template, click the
icon in the Actions column, and select Delete.In the confirmation dialog box, click OK.
API reference
| Operation | Description |
|---|---|
| CreateParameterGroup | Creates a parameter template |
| ModifyParameterGroup | Modifies a parameter template |
| CloneParameterGroup | Clones a parameter template from one region to another |
| DescribeParameterGroups | Lists parameter templates available in a region |
| DescribeParameterGroup | Gets the details of a parameter template |
| DeleteParameterGroup | Deletes a parameter template |
FAQ
How do I reset a parameter in a custom template to its default value?
Find the parameter in the template, change its value to the default, and save the template. Then re-apply the template to your instance. For the default value of a parameter, check the Modifiable Parameters tab on the instance's Parameters page. For steps, see Modify a custom parameter template and Apply a template to a single instance.