Skip to content

5 Changes of Parameters

Source chapter 3.3 for PostgreSQL 9.6.
Beta 1Source pages: PDF 23-27Original PDF on GitHub

PDF page 23

The following parameters have been changed in PostgreSQL 9.6.

3.3.1 Added Parameters

The following parameters have been added.

Parameter NameDescription (context)Default Value
backend_flush_afterWhen single backend writes more than specified size, attempt to force the OS to flush these writes to disk. (user)128kB
bgwriter_flush_afterBgwriter force the flush at the time of writing occurrence greater than or equal to the specified size (sighup)512kB
checkpoint_flush_afterCheckpointer force the flush at the time of writing occurrence greater than or equal to the specified size (sighup)256kB
enable_fkey_estimatesUse the foreign key to estimate join cost. (user)on
force_parallel_modeForce parallel processing (user)off
idle_in_transaction_session_timeoutIdle transaction timeout (user)0
max_parallel_degreeThe maximum value of the degree of parallelism (user)2
old_snapshot_thresholdThe minimum time that a snapshot is guaranteed valid. (postmaster)-1
replacement_sort_tuplesThe maximum number of tuples to be sorted using Replacement Selection (user).150000
parallel_setup_costStart cost of parallel processing (user)1000
parallel_tuple_costTuple processing cost of parallel processing (user) 0.1Tuple processing cost of parallel processing (user) 0.1
syslog_sequence_numbersAdd a sequence number to the SYSLOG message (sighup)on
syslog_split_messagesSplit long SYSLOG messages (sighup)on
wal_writer_flush_afterWal writer is forced to flush at the time of writing occurrence greater than or equal to the specified size (sighup)1MB
Table 18 Added Parameters

PDF page 24

idle_in_transaction_session_timeout parameter

When the transaction is idle for a specified period of time in milliseconds, specify the time to forcibly disconnect the session. The default value is 0 in the time-out does not occur. Specify the parameters from psql of the session in the following example and is running a COMMIT statement from a while waiting after the BEGIN statement is executed.

Example 15 Automatic termination of the idle transaction
postgres=> SET idle_in_transaction_session_timeout = 1000 ;
SET
postgres=> BEGIN ;
BEGIN
postgres=> -- Wait 2 seconds
postgres=> COMMIT ;
FATAL:  terminating connection due to idle-in-transaction timeout
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
syslog_sequence_numbers parameter, syslog_split_messages parameter

In a message to be output to the SYSLOG to add the information. By setting the syslog_sequence_numbers parameter to on, the sequence number for each process in the message that is output to the SYSLOG will be added. The default value is on. The syslog_split_messages parameter splits the message if the message has exceeded the PG_SYSLOG_LIMIT (900) bytes. The example below is the log of the instance startup. Process of process ID 3155 will being output the message. [1-1], [1-2], [2-1], has been added in the syslog_sequence_numbers parameter is part of the [2-2].

PDF page 25

Example 16 Change of SYSLOG output
May 15 13:35:55 rel71-2 postgres[3155]: [1-1] LOG:  redirecting log
output to logging collector process
May 15 13:35:55 rel71-2 postgres[3155]: [1-2] HINT:  Future log output
will appear in directory "pg_log".
May 15 13:35:55 rel71-2 postgres[3155]: [2-1] LOG:  ending log output
to stderr
May 15 13:35:55 rel71-2 postgres[3155]: [2-2] HINT:  Future log output
will go to log destination "syslog".
old_snapshot_threshold parameter

This parameter specifies the survival time of the snapshot in seconds. Unnecessary tuple exceeds the threshold value can be released by vacuum. The number of seconds that can be specified for this parameter is from -1 to 86,400. However, you can specify up to 60d is to specify the number of days, such as “1d”. The default value of -1 in the same operation as the previous version, disable this feature. Referring to the deleted snapshot error “ERROR: snapshot too old” will occur.

3.3.2 Changed Parameters

The following parameters are changed in the range of setting or the options.

log_line_prefixSet to output the time stamp of the numeric types have been added
effective_io_concurrencyIt can now be specified in the ALTER TABLESPACE SET statement
wal_levelSetting archive and hot_standby has been unified in the “replica”
synchronous_commitThe remote_apply can now be specified
autovacuum_max_workersThe maximum value has been changed to 262,143 from 8,388,607
max_connectionsThe maximum value has been changed to 262,143 from 8,388,607
max_replication_slotsThe maximum value has been changed to 262,143 from 8,388,607
max_wal_sendersThe maximum value has been changed to 262,143 from 8,388,607
max_worker_processesThe maximum value has been changed to 262,143 from 8,388,607
superuser_reservrd_connectionsThe maximum value has been changed to 262,143 from 8,388,607
wal_writer_delayShort_desc column of pg_settings catalog has been changed
Table 19 Changed Parameters

Parameter Name Modification

PDF page 26

log_line_prefix parameter

Can now specify the % n which is numerical representation of a time stamp.

Example 17 Parameter log_line_prefix
$ grep log_line_prefix data/postgresql.conf
log_line_prefix = '%n '
$ tail -1 data/pg_log/postgresql-2016-05-15_171832.log
1460362712.163 LOG:  autovacuum launcher started
wal_level parameter

“Archive” and “hot_standby” value for this parameter have been unified to “replica”. However, when archive or hot_standby is specified , the error doesn’t occur and it is considered to be a replica.

Example 18 Parameter wal_level
$ grep wal_level data/postgresql.conf
wal_level = hot_standby
$ psql
postgres=> show wal_level ;
wal_level
-----------
 replica
(1 row)
synchronous_commit parameter

Value “remote_apply” can now be specified for this parameter. Set this value, in a synchronous replication environment, transaction of the master instance will wait until the WAL is applied on the slave instance. This makes it possible to read the updated data on the slave instance at the time of the completion of the transaction. If recovery_min_apply_delay parameter is specified in the recovery.conf file on the slave instance, the completion of the COMMIT statement on the master instance will wait for the specified time.

3.3.3 Parameters changed the default value

The default values of the following parameters have been changed.

PDF page 27

Parameter NamePostgreSQL 9.5PostgreSQL 9.6
server_versionserver_version_num9.5.2 905029.6beta1 90600
Table 20 Parameters the default value of which is changed