All Products
Search
Document Center

PolarDB:Default values of cluster parameters

Last Updated:Dec 09, 2025

You can adjust database parameters to optimize performance, enhance security, or meet specific functional requirements. PolarDB for PostgreSQL (Compatible with Oracle) pre-optimizes certain parameters from the community version to deliver high performance and stability in a cloud environment. This topic provides a comprehensive parameter reference and configuration recommendations for core parameters to assist with parameter tuning.

Important parameters

PolarDB for PostgreSQL (Compatible with Oracle) sets default parameter values based on performance, availability, and reliability considerations. These values may differ from the community version defaults. In particular, PolarDB sets the following parameters to their default values for optimal performance. You can modify these parameters in the console as needed.

Parameter

Description

polar_comp_stmt_level_tx

Controls whether to roll back uncommitted database updates when an exception occurs. Valid values:

  • ON: Exceptions do not automatically roll back previous uncommitted database updates. This simulates the behavior of Oracle.

  • OFF: Exceptions roll back uncommitted database updates.

Default value:

  • Oracle syntax compatibility 2.0: ON.

  • Oracle syntax compatibility 1.0: OFF.

Note
  • This parameter is changed to polar_enable_stmt_transaction_rollback in Oracle syntax compatibility 2.0.

  • In Oracle, when a runtime error occurs in an SQL command, all database updates caused by that single command are rolled back. This is called statement-level transaction isolation. For example, if a single UPDATE command successfully updates five rows but an exception occurs when it attempts to update a sixth row, the updates to all six rows made by this UPDATE command are rolled back. The effects of previous SQL commands that have not yet been committed or rolled back are suspended until a COMMIT or ROLLBACK command is executed. For more information, see polar_comp_stmt_level_tx.

  • You can run the SHOW command to view the current setting of this parameter in the database.

wal_level

Determines how much information is written to the write-ahead logging (WAL). Valid values:

  • replica (Default): The WAL does not contain the information required for logical decoding. This reduces the amount of data written to the WAL and can improve database write performance.

  • logical: The WAL contains the information required for logical replication. This increases the amount of data written to the WAL.

Note
  • Modifying this parameter restarts the database. Proceed with caution.

  • You can run the SHOW wal_level; command to view the current setting of this parameter in the database.

log_statement

Sets the level of the audit log. The default value is ddl, which means that only DDL SQL statements are audited. Printing fewer logs can improve database performance. Valid values:

  • none: Does not record statements.

  • ddl (Default): Records DDL statements such as CREATE/ALTER/DROP.

  • mod: Records DDL and DML (INSERT/UPDATE/DELETE) statements.

  • all: Records all SQL statements.

Note
  • Enabling or disabling the SQL Explorer and Audit feature in the console automatically modifies this parameter:

    • Enabling audit logs sets log_statement = all.

    • Disabling audit logs sets log_statement = ddl.

  • You can run the SHOW log_statement; command to view the current setting of this parameter in the database.

Default values of common cluster 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

extra_float_digits

0

fsync

-

on

full_page_writes

-

off

gin_pending_list_limit

4096

hot_standby

-

on

hot_standby_feedback

-

on

enormous_pages

-

on

idle_in_transaction_session_timeout

3600000

jit

-

off

lock_timeout

0

logging_collector

-

on

log_connections

-

off

log_disconnections

-

off

log_error_verbosity

-

default

log_min_duration_statement

5000

log_statement

-

ddl

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