The default values of some parameters in PolarDB for PostgreSQL are modified from V1.1.28 of PostgreSQL 11 and V14.5.1.1 of PostgreSQL 14.

Background information

The default values of some parameters in PolarDB for PostgreSQL are modified. The modifications are valid only for new clusters. New default values can significantly improve the performance of databases. You can modify the default values in the console.
Note You can execute the following statement to view the minor version of a PolarDB for PostgreSQL cluster:
  • PostgreSQL 11
    show polar_version;
  • PostgreSQL 14
    select version();

Parameters

The default values are modified for the following parameters.
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;
Note For more information about the default values of other parameters, see Default values of cluster parameters.