5 Configuration Parameters
PDF page 57
In PostgreSQL 12 the following parameters have been changed.
3.3.1 Added parameters
The following parameters have been added.
| Parameter name | Description (context) | Default Val |
|---|---|---|
| archive_cleanup_command | Migrate from recovery.conf (sighup) | - |
| data_sync_retry | Behavior when fsync system call fails | off |
| (Also added to 11.2) | (postmaster) | |
| default_table_access_method Default storage engine name (user) | default_table_access_method Default storage engine name (user) | heap |
| log_statement_sample_rate | Rate of output of SQL statement to log (superuser) | 1 |
| plan_cache_mode | Changed the behavior of caching execution plans (user) | auto |
| primary_conninfo | Migration from recovery.conf file (postmaster) | - |
| primary_slot_name | Migrate from recovery.conf (postmaster) | - |
| promote_trigger_file | Migrate from recovery.conf (sighup) | - |
| recovery_end_command | Migrate from recovery.conf (sighup) | - |
| recovery_min_apply_delay | Migrate from recovery.conf (sighup) | 0 |
| recovery_target | Migrate from recovery.conf (postmaster) | - |
| recovery_target_action | Migrate from recovery.conf (postmaster) | pause |
| recovery_target_inclusive | Migrate from recovery.conf (postmaster) | on |
| recovery_target_lsn | Migrate from recovery.conf (postmaster) | - |
| recovery_target_name | Migrate from recovery.conf (postmaster) | - |
| recovery_target_time | Migrate from recovery.conf (postmaster) | - |
| recovery_target_timeline | Migrate from recovery.conf (postmaster) | latest |
| recovery_target_xid | Migrate from recovery.conf (postmaster) | - |
| restore_comand | Migrate from recovery.conf (postmaster) | - |
| shared_memory_type | Type of shared memory (postmaster) | OS depend |
| ssl_library | Name of library providing SSL function (internal) | - |
| ssl_max_protocol_version | Maximum version of SSL protocol to support (sighup) | - |
| ssl_min_protocol_version | Minimum version of SSL protocol to support (sighup) | TLSv1 |
| tcp_user_timeout | TCP timeout specification (user) | 0 |
| wal_init_zero | Fill-in WAL file to zero (superuser) | on |
| wal_recycle | Recycle WAL File (superuser) | on |
PDF page 58
Primary_conninfo parameter
Specifies the connection string for the primary instance. Previously this was specified in the recovery.conf file. The default value for the application_name entry has traditionally been “walreceiver”, but when the cluster_name parameter is specified, the value for cluster_name has been changed to the default value. The value of the application_name column in the pg_stat_replication catalog changes.
Ssl_library parameter
This parameter indicates the name of the library that provides the SSL feature. The parameter value is “OpenSSL” when –with-openssl is specified when executing configure command in Red Hat Enterprise Linux environment.
Shared_memory_type parameter
This parameter specifies the type of shared memory (such as shared_buffers).
PDF page 59
| Setting | Description | System call |
|---|---|---|
| mmap | Use an anonymous memory map. | mmap |
| sysv | Use System V shared memory. | shmget |
| windows | Use Windows shared memory. | CreateFileMapping |
The default value for this parameter on Linux is mmap. This is the same behavior as PostgreSQL
9.3 and later. Very small System V shared memory and most shared memory are configured using
memory map file (mmap). Setting this parameter to sysv allows you to revert to the pre-PostgreSQL
9.2 behavior. In this case, configure all shared memory using System V shared memory.
Plancache_mode parameter
This parameter sets the method for caching the execution plan of a prepared statement (created by the PREPARE statement). The default value is auto, which is the same behavior as previous versions. Normally, an execution plan is generated each time the SQL statement created by the PREPARE statement is executed by the EXECUTE statement. In the following example, it can be seen that the execution plan changes depending on the parameters specified in the EXECUTE statement. It indicates that the data stored in column C2 is uneven, there is little plan0 data (does an index search), and there is a lot of plan1 data (a whole table is searched).
PDF page 60
PDF page 61
The newly added parameter plan_cache_mode changes this behavior. Setting the parameter value to “force_custom_plan” turns off execution plan caching. On the other hand, setting the parameter value to “force_generic_plan” immediately enables execution plan caching.
Data_sync_retry parameter
This parameter determines what happens if the fsync system call issued during a checkpoint fails. In previous versions, the fsync function was re-executed (data_sync_retry = “on”), and the default behavior of the new version (data_sync_retry = “off”) caused an instance stoppage by PANIC if the fsync system call failed. This parameter has been added since PostgreSQL 11.2.
3.3.2 Changed parameters
The setting range and options were changed for the following configuration parameters.
PDF page 62
| dynamic_shared_memory_type | setting value “none” has been deleted. |
|---|---|
| log_autovacuum_min_duration | Log output contents now change according to VACUUM execution status. |
| log_connections | Application_name information has been added to the log. |
| plpgsql.extra_warnings | The following parameter values have been added: too_many_rows strict_multi_assignment |
| trace_sort | The log output message has been changed. |
| wal_level | It is now checked for proper level at startup. |
| wal_sender_timeout | The context has been changed from sighup to user. |
| default_with_oids | It cannot be set to “on”. |
| recovery_target_timeline | “Current” has been added as a setting value, the default value has been changed to “latest”. |
| autovacuum_vacuum_cost_delay Data type changed from integer to real. | autovacuum_vacuum_cost_delay Data type changed from integer to real. |
Parameter name Changes client_min_messages It is no longer possible to set it to a higher level than ERROR.
The default_with_oids parameter cannot be referenced from the pg_settings catalog.
PDF page 63
Wal_sender_timeout parameter
This parameter can now be changed by the user on a per session basis. This allows changing parameters on a per-connection basis from slave instances in a streaming replication environment.
Log_connections parameter
The value of the application_name parameter is added to the log that is output when this parameter is set to ‘on’.
PDF page 64
Connection from psql command
Connection from pg_basebackup command
Connection from Streaming Replication slave instance
Trace_sort parameter
The output log format has been changed when this parameter is set to ‘on’.
Wal_level parameter
When a replication slot is used, it became to be checked whether the wal_level parameter is an appropriate value during the instance startup. If the required level is not set, instance startup will fail.
PDF page 65
In the following example, wal_level is changed to “replica” and the instance is restarted in the Logical Replication environment.
3.3.3 Parameters with default values changed
The default values of the following configuration parameters have been changed.
| Parameter name | PostgreSQL 11 | PostgreSQL 12 | Note |
|---|---|---|---|
| autovacuum_vacuum_cost_delay | 20 | 2 | |
| extra_float_digitsjit | 0 | 1 | |
| off | on | ||
| recovery_target_timelineserver_version | current | latest | |
| 11.5 | 12.0 | ||
| server_version_num | 110005 | 120000 |