Default values of cluster parameters
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 version | Default | Behavior |
|---|---|---|
| Oracle syntax compatibility 2.0 | ON | Exceptions 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.0 | OFF | Exceptions 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).
| Value | Default | Description |
|---|---|---|
replica | Yes | WAL contains enough information for streaming replication but not logical decoding. Reduces WAL volume and improves write throughput. |
logical | No | WAL contains additional information required for logical replication. Increases WAL volume. |
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.
| Value | Default | Statements logged |
|---|---|---|
none | No | None |
ddl | Yes | DDL statements (CREATE, ALTER, DROP) |
mod | No | DDL and DML statements (INSERT, UPDATE, DELETE) |
all | No | All SQL statements |
Enabling the SQL Explorer and Audit feature in the console setslog_statement = all. Disabling it resetslog_statement = ddl.
Default values of common cluster parameters
All parameters below are standard PostgreSQL engine parameters.
| Parameter | Unit | Default value |
|---|---|---|
authentication_timeout | seconds | 60 |
autovacuum | — | on |
autovacuum_analyze_scale_factor | 0.05 | |
autovacuum_analyze_threshold | 50 | |
autovacuum_freeze_max_age | 500000000 | |
autovacuum_max_workers | 5 | |
autovacuum_multixact_freeze_max_age | 700000000 | |
autovacuum_naptime | 30 | |
autovacuum_vacuum_cost_delay | 0 | |
autovacuum_vacuum_cost_limit | 10000 | |
autovacuum_vacuum_scale_factor | 0.02 | |
autovacuum_vacuum_threshold | 50 | |
backend_flush_after | 0 | |
bgwriter_delay | 10 | |
checkpoint_timeout | 30 | |
constraint_exclusion | — | partition |
cpu_index_tuple_cost | 0.005 | |
cpu_operator_cost | 0.0025 | |
cpu_tuple_cost | 0.01 | |
datestyle | — | 'ISO,YMD' |
deadlock_timeout | 1000 | |
default_with_oids | — | off |
dynamic_shared_memory_type | — | posix |
enable_partition_pruning | — | on |
enormous_pages | — | on |
extra_float_digits | 0 | |
fsync | — | on |
full_page_writes | — | off |
gin_pending_list_limit | 4096 | |
hot_standby | — | on |
hot_standby_feedback | — | on |
idle_in_transaction_session_timeout | 3600000 | |
jit | — | off |
lock_timeout | 0 | |
log_connections | — | off |
log_disconnections | — | off |
log_error_verbosity | — | default |
log_min_duration_statement | 5000 | |
log_statement | — | ddl |
logging_collector | — | on |
max_files_per_process | 10000 | |
max_locks_per_transaction | 64 | |
max_prepared_transactions | 800 | |
max_replication_slots | 64 | |
max_worker_processes | 256 | |
seq_page_cost | 1 | |
ssl | — | off |
statement_timeout | 0 | |
synchronous_commit | — | off |
temp_file_limit | GB | 100 |
timezone | — | 'UTC' |
wal_buffers | MB | 16 |
wal_level | — | replica |
wal_writer_delay | 10 |