This topic describes how to view and modify the parameters of an ApsaraDB RDS for PostgreSQL instance in the ApsaraDB RDS console or by calling the ApsaraDB RDS API. You can also view the parameter modification history in the ApsaraDB RDS console.
Usage notes
- The modification of some parameters triggers a restart of your RDS instance. After you modify the parameters and click Apply Changes, 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 Editable 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. Proceed with caution.
- When you modify the parameters of your RDS instance, you can view the valid values of a parameter in the Value Range column of the parameter on the Editable Parameters tab of the Parameters page in the ApsaraDB RDS console.
Modify parameters
- Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
- In the left-side navigation pane, click Parameters.
- On the Editable Parameters tab, modify the parameters of your RDS instance based on your business requirements.
- Modify a single parameter of the RDS instance.
- Find the parameter and click the
icon in the Running Parameter Value column.
- Enter a new value and click OK.
- Click Apply Changes.
- In the message that appears, click OK.
- Find the parameter and click the
- Modify multiple parameters at a time.
- Click Export Parameters to download the parameter settings of your RDS instance as a file to your computer.
- Open the file and modify the parameters.
- Click Import Parameters.
- In the Import Parameters dialog box, paste the parameter settings that you have copied from the file. Then, click OK.
- Confirm the values of the modified parameters and click Apply Changes.
- Modify a single parameter of the RDS instance.
View the parameter modification history
- Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
- In the left-side navigation pane, click Parameters.
- Click the Edit History tab.
- Select a time range and click OK.
Configure parameters by using expressions
You can set a parameter to an expression for your RDS instance. If you set an instance type-related parameter to an expression, the value of the parameter dynamically changes when the instance type changes.
The following table describes the supported expression syntax.
Category | Description | Example |
---|---|---|
Parameters | The following parameters support expressions: work_mem, maintenance_work_mem, autovacuum_work_mem, max_parallel_workers, max_parallel_workers_per_gather, effective_cache_size, autovacuum_max_workers, max_wal_size, min_wal_size, temp_file_limit, wal_buffers, and max_parallel_maintenance_workers.
Note The max_parallel_maintenance_workers parameter is supported for PostgreSQL 11.0 to PostgreSQL 14.0. Other parameters are
supported for PostgreSQL 10.0 to PostgreSQL 14.0.
|
effective_cache_size |
Variables |
Note For more information about the instance types and the storage capacity, memory capacity,
number of cores, and maximum number of connections that are supported by each instance
type, see Primary ApsaraDB RDS for PostgreSQL instance types.
|
effective_cache_size={DBInstanceClassMemory/16384} |
Operators |
|
|
Functions |
|
max_parallel_workers={GREATEST(DBInstanceClassCPU*3/4, 8)} |
Related operations
Operation | Description |
---|---|
Modify parameters of an instance | Modifies the parameters of an instance. |
Query the parameter template of an ApsaraDB for RDS instance | Queries the parameter templates that are available for an instance. |
Query parameter configurations | Queries the parameter settings of an instance. |
Parameters
For more information about the parameters that are supported for PostgreSQL, see the official PostgreSQL documentation.