Modify ApsaraDB RDS for PostgreSQL instance parameters in the console or by calling API operations to optimize performance. You can also view parameter modification history.
Usage notes
-
Modifying certain parameters requires an instance restart after you click Apply Changes. Check the Force Restart column on the Editable Parameters tab in the console. Restarting interrupts service. Plan accordingly.
-
When modifying a parameter, check the Valid Values column on the Editable Parameters tab.
-
Changes to these parameters on a primary instance automatically sync to read-only instances.
wal_level, max_replication_slots, max_wal_senders, max_locks_per_transaction, max_worker_processes, max_prepared_transactions -
After you submit a change, the system validates it. If the value is invalid or prevents startup, the change rolls back with a Failed status. Check the Status column on the Edit History tab.
-
The
log_statementparameter cannot be modified directly. Instead, enable or disable SQL Explorer and Audit.
Modify parameter values
Log on to the ApsaraDB RDS console and 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 instance ID.
-
In the navigation pane on the left, click Parameters.
-
On the Editable Parameters tab, find the parameter to modify. Modify parameters individually or in batches:
-
Modify a single parameter
-
Click the
icon next to the target parameter. -
Enter the new value and click OK.
-
Click Apply Changes.
-
Select when the change takes effect: Take Effect Immediately, Take Effect Within the Maintenance Window, or Take Effect at Specified Time Range. Then, click OK.
-
-
Modify parameters in batches
-
Click Export Parameters to download the parameter file.
-
Open the file and modify parameter values.
-
Click Import Parameters.
-
In the Import Parameters dialog box, paste the modified parameters and values, and click OK.
-
Verify the changes and click Apply Changes.
-
Select when the changes take effect: Take Effect Immediately, Take Effect Within the Maintenance Window, or Take Effect at Specified Time Range. Then, click OK.
-
NoteOn the Scheduled Tasks for Parameter Modification tab, view scheduled parameter modifications for Take Effect Within the Maintenance Window or Take Effect at Specified Time Range.
-
View modification history
Log on to the ApsaraDB RDS console and 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 instance ID.
-
In the navigation pane on the left, click Parameters.
-
Click the Edit History tab.
-
Select a time range and click OK.
Parameter expressions
Use expressions for parameters that depend on instance specifications. When you change the instance type, expression-based parameters adjust automatically.
The following table lists the expression syntax.
|
Category |
Description |
Example |
|
Parameters |
The following parameters support expressions: Note
The max_parallel_maintenance_workers parameter is available only in ApsaraDB RDS for PostgreSQL 11.0 and later. |
effective_cache_size |
|
Variables |
Note
For specifications such as storage, memory, CPU cores, and connection limits, see Primary ApsaraDB RDS for PostgreSQL instance types. |
effective_cache_size={DBInstanceClassMemory/16384} |
|
Operators |
|
|
|
Functions |
|
max_parallel_workers={GREATEST(DBInstanceClassCPU*3/4, 8)} |
References
-
For PostgreSQL parameter details, see Server Configuration in the PostgreSQL documentation.
-
To modify parameters by calling API operations:
API
Description
Modifies the parameters of an RDS instance.
Queries the parameter template of a database.
Queries the current parameters of an instance.
FAQ
Q: How do I increase the maximum connections for an ApsaraDB RDS for PostgreSQL instance?
A: The maximum connections (max_connections) depends on the instance type and cannot be modified directly. To increase connections, upgrade the instance type. For connection limits by instance type, see Primary ApsaraDB RDS for PostgreSQL instance types and Read-only ApsaraDB RDS for PostgreSQL instance types.