All Products
Search
Document Center

ApsaraDB RDS:Configure parameters for ApsaraDB RDS for PostgreSQL

Last Updated:Jun 02, 2026

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_statement parameter cannot be modified directly. Instead, enable or disable SQL Explorer and Audit.

Modify parameter values

  1. 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.

  2. In the navigation pane on the left, click Parameters.

  3. On the Editable Parameters tab, find the parameter to modify. Modify parameters individually or in batches:

    • Modify a single parameter

      1. Click the icon next to the target parameter.

      2. Enter the new value and click OK.

      3. Click Apply Changes.

      4. 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

      1. Click Export Parameters to download the parameter file.

      2. Open the file and modify parameter values.

      3. Click Import Parameters.

      4. In the Import Parameters dialog box, paste the modified parameters and values, and click OK.

      5. Verify the changes and click Apply Changes.

      6. 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.

    Note

    On 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

  1. 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.

  2. In the navigation pane on the left, click Parameters.

  3. Click the Edit History tab.

  4. 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:

Parameters that support expressions

  • work_mem: memory for internal sort operations and hash tables before writing to temporary files.

  • maintenance_work_mem: maximum memory for maintenance operations such as VACUUM and CREATE INDEX.

  • autovacuum_work_mem: maximum memory per autovacuum worker process.

  • max_parallel_workers: maximum workers for parallel operations.

  • max_parallel_workers_per_gather: maximum workers per Gather or Gather Merge node.

  • effective_cache_size: estimated total disk cache size for the query planner.

  • autovacuum_max_workers: maximum concurrent autovacuum processes (excluding the launcher).

  • max_wal_size: WAL size that triggers a checkpoint.

  • min_wal_size: minimum WAL size. Below this threshold, old WAL files are recycled at checkpoints instead of removed.

  • temp_file_limit: maximum disk space per process for temporary files (sorting, hashing, cursors).

  • wal_buffers: shared memory for WAL data not yet written to disk.

  • max_parallel_maintenance_workers: maximum parallel workers for CREATE INDEX.

  • max_worker_processes: maximum concurrent worker processes.

Note

The max_parallel_maintenance_workers parameter is available only in ApsaraDB RDS for PostgreSQL 11.0 and later.

effective_cache_size

Variables

  • AllocatedStorage: storage capacity in MB. Integer.

  • DBInstanceClassMemory: memory size in bytes. Integer.

  • DBInstanceClassCPU: number of CPU cores. Integer.

  • DBInstanceClassConnections: maximum connections. Integer.

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

  • Expression syntax: Expressions must be enclosed in braces ({}).

  • Division operator (/): returns an integer quotient. Fractional results are truncated, not rounded.

  • Multiplication operator (*): returns an integer product. Fractional results are truncated, not rounded.

Functions

  • GREATEST(): returns the largest value from a list of integers or expressions.

  • LEAST(): returns the smallest value from a list of integers or expressions.

  • SUM(): adds values of specified integers or expressions.

max_parallel_workers={GREATEST(DBInstanceClassCPU*3/4, 8)}

References

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.