This topic describes the default values of cluster parameters.

Parameters

The default values of PolarDB for PostgreSQL parameters are a result of considering performance, availability, and reliability. They may be different from the default values of the community version. In particular, the default values of the following parameters are based on the principle of optimal performance. You can modify these parameters in the PolarDB console.

ParameterDefault valueDescription
synchronous_commitoffSpecifies whether a transaction needs to wait for WAL records to be written to the disk before it returns a success message to the client. Default value: off. Valid values:
  • off: A transaction does not wait for WAL records to be written to the disk before it returns a success message to the client.
    Note Latency exists between returning success to the client and true transaction persistence. The maximum latency value is three times the value of the wal_writer_delay parameter. The default value of the wal_writer_delay parameter is 10ms. When this parameter is set to off, the transaction commit efficiency can be improved.
  • on: A transaction waits for WAL records to be written to the disk before it returns a success message to the client.
    Note If persistence on disk is required after a transaction is committed, you can set this parameter to on in the console.
Note You can execute the following statement to view the settings of this parameter for the current cluster:
show synchronous_commit;
wal_levelreplicaSpecifies what types of data are written to WAL. Default value: replica. Valid values: Default value: replica. Valid values:
  • replica: The data required for logical replication is not written to WAL. This reduces the volume of data written to WAL and improves data write performance.
  • logical: The data required for logical replication is written to WAL. This increases the volume of data written to WAL.
Warning The cluster restarts after you modify this parameter. Proceed with caution.
Note You can execute the following statement to view the settings of this parameter for the current cluster:
show wal_level;
log_statementddlSpecifies the level of audit logs. Default value: ddl, which indicates that only logs for DDL statements are audited. Displaying less logs can improve database performance.
Note
  • You can enable the audit log feature on the SQL Explorer page of the console. Then, logs for all SQL statements are audited. For more information, see SQL Explorer.
  • You can execute the following statement to view the settings of this parameter for the current cluster:
    show log_statement;

Default values of common cluster parameters

ParameterDefault value
authentication_timeout60
autovacuumon
autovacuum_analyze_scale_factor0.05
autovacuum_analyze_threshold50
autovacuum_freeze_max_age1200000000
autovacuum_max_workers5
autovacuum_multixact_freeze_max_age1400000000
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
extra_float_digits0
fsyncon
full_page_writesoff
gin_pending_list_limit4096
hot_standbyon
hot_standby_feedbackon
huge_pageson
idle_in_transaction_session_timeout3600000
jitoff
lock_timeout0
logging_collectoron
log_connectionsoff
log_disconnectionsoff
log_error_verbositydefault
log_min_duration_statement5000
log_statementddl
max_files_per_process1000
max_locks_per_transaction64
max_prepared_transactions800
max_replication_slots64
max_worker_processes256
seq_page_cost1
ssloff
statement_timeout0
synchronous_commitoff
temp_file_limit524288000
timezone'UTC'
wal_buffers16 MB
wal_levelreplica
wal_writer_delay10