All Products
Search
Document Center

PolarDB:Default cluster parameter values

Last Updated:Mar 28, 2026

PolarDB for PostgreSQL pre-tunes certain parameters from the community edition to deliver better performance and stability in a cloud environment. Some defaults differ from standard PostgreSQL. This reference covers the parameters that affect performance and behavior, organized by category.

Note

Some parameters cannot be modified in the console. Log in to the cluster and use the command line to view and modify them.

Important parameters

The three parameters below have PolarDB-specific defaults that differ from the community edition. Modify them in the console as needed.

synchronous_commit

Controls when a transaction returns success to the client, relative to WAL durability guarantees. Default: off.

Setting details:

  • `off` (default): Transactions return success without waiting for WAL to reach disk. The maximum data loss window is 3 × wal_writer_delay (default: 10 ms). Use this when throughput matters more than strict durability.

  • `on`: Transactions wait for WAL to be written to disk before returning success. Use this when your application requires strict per-transaction durability.

  • `remote_write`: Transactions wait for WAL to be written to the standby's file system, but not necessarily flushed to disk.

  • `local`: Transactions wait for WAL to be written to the local disk only, with no standby requirement.

  • `remote_apply`: Transactions wait for WAL to be applied to the standby's transaction log. This provides the strongest consistency guarantee but increases commit latency.

To check the current setting, run SHOW synchronous_commit;.

wal_level

Controls how much information is written to write-ahead logging (WAL). Default: replica.

Important

Changing this parameter restarts the database. Plan accordingly.

ValueWAL contentUse when
replica (default)Supports read-only standby nodesStandard deployment; reduces WAL volume and improves write performance
logicalAdds data required for logical replicationYour workload uses logical replication

To check the current setting, run SHOW wal_level;.

log_statement

Sets which SQL statements are written to the audit log. Default: ddl.

ValueWhat gets logged
noneNothing
ddl (default)DDL statements: CREATE, ALTER, DROP
modDDL and DML statements: INSERT, UPDATE, DELETE
allAll SQL statements

Logging fewer statements improves database performance. The SQL Explorer and Audit feature adjusts this parameter automatically: enabling it sets log_statement = all; disabling it sets log_statement = ddl.

To check the current setting, run SHOW log_statement;.

Parameter reference

The following sections list configurable cluster parameters by category.

Connection and authentication

ParameterDescriptionDefaultRangeUnit
authentication_timeoutMaximum time to wait for a client to complete authentication. The server closes the connection if the limit is exceeded, preventing idle clients from holding connection resources.601–600seconds
sslEnables Secure Sockets Layer (SSL) encrypted connections.OFFON/OFF

Autovacuum

The autovacuum process reclaims space from dead tuples (rows left by deleted or updated data) and refreshes table statistics. Both functions are critical for maintaining query performance over time.

Note

Even when autovacuum is disabled, the system still triggers vacuum processes to prevent transaction ID wraparound.

ParameterDescriptionDefaultRangeUnit
autovacuumEnables the autovacuum background process. Requires track_counts = on.ONON/OFF
autovacuum_max_workersMaximum number of autovacuum worker processes (excluding the launcher) that can run concurrently.51–262,143processes
autovacuum_naptimeMinimum pause between autovacuum rounds on a given database. Each round issues VACUUM and ANALYZE commands for tables that need them.301–2,147,483seconds
autovacuum_vacuum_thresholdMinimum number of changed tuples (inserted, updated, or deleted) required to trigger VACUUM. Applied together with autovacuum_vacuum_scale_factor.500–2,147,483,647tuples
autovacuum_vacuum_scale_factorFraction of the table size added to autovacuum_vacuum_threshold to determine the VACUUM trigger point: autovacuum_vacuum_threshold + (autovacuum_vacuum_scale_factor × table row count).0.020–100percent
autovacuum_analyze_thresholdMinimum number of changed tuples required to trigger ANALYZE. Applied together with autovacuum_analyze_scale_factor.500–2,147,483,647tuples
autovacuum_analyze_scale_factorFraction of the table size added to autovacuum_analyze_threshold: autovacuum_analyze_threshold + (autovacuum_analyze_scale_factor × table row count).0.050–2,147,483,647percent
autovacuum_freeze_max_ageMaximum transaction ID age a table can reach before a forced VACUUM runs to prevent transaction ID wraparound. The system triggers this vacuum even when autovacuum is disabled.500,000,000100,000–2,000,000,000transaction IDs
autovacuum_multixact_freeze_max_ageMaximum multixact ID age before a forced VACUUM runs to prevent multixact ID wraparound. The system triggers this vacuum even when autovacuum is disabled.700,000,00010,000–2,000,000,000transaction IDs
autovacuum_vacuum_cost_delayCost delay applied to autovacuum operations. Set to -1 to use the vacuum_cost_delay value.0-1–100milliseconds
autovacuum_vacuum_cost_limitTotal cost limit for autovacuum operations, distributed proportionally across all running worker processes. Set to -1 to use the vacuum_cost_limit value.10,000-1–10,000cost value

Checkpoints and background writing

ParameterDescriptionDefaultRangeUnit
checkpoint_timeoutMaximum interval between automatic WAL checkpoints.3030–86,400seconds
bgwriter_delayPause between background writer rounds that flush dirty pages to disk.600,00010–10,000milliseconds
backend_flush_afterNumber of dirty pages a backend process can write before the OS flushes the file cache to disk. Set to 0 to disable.00–256blocks
full_page_writesWrites the full content of a data page to WAL on its first modification after a checkpoint. Prevents partial-page corruption after power failures.OFFON/OFF
wal_buffersShared memory used to buffer WAL data before it is written to disk.16 MB-1–262,143 (up to 2,097,144 KB)WAL blocks (8 KB each)
wal_levelSee Important parameters. Changing this parameter restarts the database.replicareplica/logical
wal_writer_delayMaximum pause between walwriter flush rounds.600,0001–10,000milliseconds

Query planning and execution

ParameterDescriptionDefaultRange
constraint_exclusionControls whether the planner uses CHECK constraints to prune query results. partition applies optimization only to partitioned tables and UNION ALL subqueries.partitionon/off/partition
cpu_index_tuple_costPlanner cost estimate for processing each index entry during an index scan.0.0050–1.79769e+308
cpu_operator_costPlanner cost estimate for processing each operator or function in a query.0.00250–1.79769e+308
cpu_tuple_costPlanner cost estimate for processing each row in a query.0.010–1.79769e+308
enable_partition_pruningEnables partition pruning during planning and execution to skip scanning irrelevant partitions.ONON/OFF
seq_page_costPlanner cost estimate for fetching a page in a sequential scan.10–1.79769e+308
jitEnables Just-In-Time (JIT) compilation for eligible queries to accelerate execution.OFFON/OFF

Timeout settings

ParameterDescriptionDefaultRangeUnit
deadlock_timeoutTime a transaction waits for a lock before the system checks for a deadlock.1,0000–2,147,483,647milliseconds
idle_in_transaction_session_timeoutMaximum time a session can remain idle inside a transaction. The session is terminated when this limit is exceeded. Set to 0 to disable.3,600,0000–2,147,483,647milliseconds
lock_timeoutMaximum time an operation waits to acquire a lock. The operation fails with an error when this limit is exceeded. Set to 0 to wait indefinitely.00–2,147,483,647milliseconds
statement_timeoutMaximum execution time for a single SQL statement. The statement is cancelled when this limit is exceeded. Set to 0 for no limit.00–262,143milliseconds

Logging and auditing

ParameterDescriptionDefaultRangeUnit
logging_collectorEnables the log collector process, which captures and writes log output during cluster operation.ONON/OFF
log_connectionsLogs each successful client connection.OFFON/OFF
log_disconnectionsLogs each client disconnection.OFFON/OFF
log_error_verbosityControls how much detail is included in error log messages. terse: severity, message, and position only. default: adds hints and detail. verbose: all available fields.defaultterse/default/verbose
log_min_duration_statementLogs any SQL statement that runs longer than the specified threshold. Set to 0 to log all statements. Set to -1 to disable slow query logging.5,0000–2,147,483,647milliseconds
log_statementSee Important parameters.ddlnone/ddl/mod/all

Replication and high availability

ParameterDescriptionDefaultRange
hot_standbyAllows read-only nodes to accept read-only queries during recovery.ONON/OFF
hot_standby_feedbackSends feedback from read-only nodes to the primary node about active queries. When enabled, the primary delays cleaning up row versions still needed by read-only node queries, reducing query conflicts.ONON/OFF
max_replication_slotsMaximum number of replication slots the cluster supports.640–262,143

Resource management

ParameterDescriptionDefaultRangeUnit
dynamic_shared_memory_typeImplementation method for dynamic shared memory.posixposix/sysv/mmap
gin_pending_list_limitMaximum size of the pending list for a Generalized Inverted Index (GIN) index in fast update mode.4,09664–2,097,151KB
huge_pagesRequests large memory pages from the operating system when available.ONON/OFF
max_files_per_processMaximum number of file handles each background process can open simultaneously.10,00064–2,147,483,647
max_locks_per_transactionMaximum number of locks a single transaction can hold.6410–2,147,483,647
max_prepared_transactionsMaximum number of transactions that can be in the prepared state (two-phase commit protocol) simultaneously.8000–262,143
max_worker_processesMaximum number of background worker processes the cluster can start, including parallel query workers.2560–262,143
temp_file_limitMaximum total size of temporary files (used for sorting, hashing, and similar operations) a single backend process can create. Set to -1 for no limit.104,857,600 (100 GB)-1–2,147,483,647KB

Formatting and behavior

ParameterDescriptionDefaultRange
datestyleDisplay format for date and time values. Combine an output format (ISO, Postgres, SQL, or German) with a date order (DMY, MDY, or YMD).ISO,YMDSee description
default_with_oidsDeprecated. The current version no longer supports OIDs, so this can only be set to OFF.OFFOFF only
extra_float_digitsNumber of extra significant digits displayed for floating-point values beyond standard precision. Higher values produce more accurate output.0-15–3
fsyncForces data changes to be flushed from the OS cache to disk after operations such as COMMIT. Disabling this improves write performance but risks data corruption on a system crash.ONON/OFF
timezoneTime zone used to display and interpret timestamps in the session. For available values, see the parameter modification range in the console.UTCStandard time zone names, e.g., Asia/Shanghai, UTC