Default values of cluster parameters

Updated at:
Copy as MD

PolarDB for PostgreSQL (Compatible with Oracle) pre-tunes a set of parameters from the community PostgreSQL defaults to deliver high performance and stability in a cloud environment. Use this reference to understand what PolarDB has changed and how to adjust parameters for your workload.

To check the current value of any parameter, run:

SHOW <parameter_name>;

Modify parameters in the PolarDB console. For parameters marked Requires restart, the database restarts automatically after you save the change—plan accordingly.

Key parameters

PolarDB sets the following parameters to non-community defaults. PolarDB-specific parameters (prefixed with polar_) are extensions to the standard PostgreSQL engine.

polar_comp_stmt_level_tx

Controls whether a runtime exception rolls back only the failed statement or the entire transaction.

Compatibility versionDefaultBehavior
Oracle syntax compatibility 2.0ONExceptions do not automatically roll back previous uncommitted updates. Only the failed statement is rolled back, matching Oracle's statement-level transaction isolation behavior.
Oracle syntax compatibility 1.0OFFExceptions roll back all uncommitted updates in the transaction.
In Oracle syntax compatibility 2.0, this parameter is renamed to polar_enable_stmt_transaction_rollback. For a detailed explanation of statement-level transaction isolation, see polar_comp_stmt_level_tx.

wal_level

Controls how much information is written to the write-ahead log (WAL).

ValueDefaultDescription
replicaYesWAL contains enough information for streaming replication but not logical decoding. Reduces WAL volume and improves write throughput.
logicalNoWAL contains additional information required for logical replication. Increases WAL volume.
Warning

Changing wal_level requires a database restart. Schedule this change during a maintenance window.

log_statement

Sets which SQL statements are written to the audit log. Logging fewer statements reduces I/O overhead and improves performance.

ValueDefaultStatements logged
noneNoNone
ddlYesDDL statements (CREATE, ALTER, DROP)
modNoDDL and DML statements (INSERT, UPDATE, DELETE)
allNoAll SQL statements
Enabling the SQL Explorer and Audit feature in the console sets log_statement = all. Disabling it resets log_statement = ddl.

Default values of common cluster parameters

All parameters below are standard PostgreSQL engine parameters.

ParameterUnitDefault value
authentication_timeoutseconds60
autovacuumon
autovacuum_analyze_scale_factor0.05
autovacuum_analyze_threshold50
autovacuum_freeze_max_age500000000
autovacuum_max_workers5
autovacuum_multixact_freeze_max_age700000000
autovacuum_naptime30
autovacuum_vacuum_cost_delay0
autovacuum_vacuum_cost_limit10000
autovacuum_vacuum_scale_factor0.02
autovacuum_vacuum_threshold50
backend_flush_after0
bgwriter_delay10
checkpoint_timeout30
constraint_exclusionpartition
cpu_index_tuple_cost0.005
cpu_operator_cost0.0025
cpu_tuple_cost0.01
datestyle'ISO,YMD'
deadlock_timeout1000
default_with_oidsoff
dynamic_shared_memory_typeposix
enable_partition_pruningon
enormous_pageson
extra_float_digits0
fsyncon
full_page_writesoff
gin_pending_list_limit4096
hot_standbyon
hot_standby_feedbackon
idle_in_transaction_session_timeout3600000
jitoff
lock_timeout0
log_connectionsoff
log_disconnectionsoff
log_error_verbositydefault
log_min_duration_statement5000
log_statementddl
logging_collectoron
max_files_per_process10000
max_locks_per_transaction64
max_prepared_transactions800
max_replication_slots64
max_worker_processes256
seq_page_cost1
ssloff
statement_timeout0
synchronous_commitoff
temp_file_limitGB100
timezone'UTC'
wal_buffersMB16
wal_levelreplica
wal_writer_delay10