This section explains the content of the file and parameters set on the standby server. After editing postgresql.conf file, start the instance.
The content for the parameters specified in postgresql.conf file is shown in the table below.
Table A.2 postgresql.conf fileParameter | Value set | Explanation |
---|
wal_level | replica or logical | Specify the output level for the transaction log. Specify "logical" when logical decoding is also to be used. |
max_wal_senders | 2 or more | Specify "2" when building a Mirroring Controller cluster system. When additionally connecting asynchronous standby servers to the cluster system, add the number of simultaneous connections from these standby servers. |
synchronous_standby_names | 'primaryServerName' | Use single quotation marks (') to enclose the name that will identify the primary server. Any name can be specified. This name will be required to rebuild the original primary server as the new standby server after the primary server was switched. Do not change this parameter while Mirroring Controller is running. Do not specify multiple names to this parameter as the Mirroring Controller can manage only one standby server. |
hot_standby | on | Specify whether queries can be run on the standby server. Specify "on". |
wal_keep_size | WAL save size (megabytes) | If a delay exceeding the value set in this parameter occurs, the WAL segment required later by the standby server may be deleted by the primary server. Additionally, if you stop a standby server (for maintenance, for example), consider the stop time and set a value that will not cause the WAL segment to be deleted. Refer to "Estimating Transaction Log Space Requirements" in the Installation and Setup Guide for Server for information on estimating the WALsave size. |
wal_log_hints | on | When using the pg_rewind command to recover a standby server, specify this parameter or enable checksums when executing the initdb command. |
wal_sender_timeout | Timeout (milliseconds) | Specify the time period after which it is determined that the receiver process (walreceiver) of the transaction log is in an abnormal state on the primary server. The specified value must be larger than the value set for the wal_receiver_status_interval parameter set in the postgresql.conf file of the standby server. By aligning this value with the value for the database process heartbeat monitoring time, you can unify the time after which it is determined that an error has occurred. |
wal_receiver_timeout | Timeout (milliseconds) | Specify the time period after which it is determined that an error has occurred when the transaction log was received on the standby server. By aligning this value with the value for the database process heartbeat monitoring time, you can unify the time after which it is determined that an error has occurred. |
backup_destination | Backup data storage destination directory | Specify the name of the backup data storage directory. Set the permissions so that only the instance administrator user can access the specified directory. Specify the same full path on all servers so that the backup data of other servers can be used to perform recovery. |
archive_mode | on | Specify the archive log mode. |
archive_command | 'installDir/bin/pgx_walcopy.cmd "%p" "backupDataStorageDestinationDirectory/archived_wal/%f"' | Specify the command and storage destination to save the transaction log. |
listen_addresses | Standby server IP address, host name, or "*" | Specify the IP address or host name of the standby server. Specify the IP address or corresponding host name that will be used to connect to the log transfer network. The content specified is also used to allow connections from client applications. To receive the connection and the transaction log from any client or standby server, specify "*". Refer to "Connections and Authentication" in the PostgreSQL Documentation for details. |
max_connections | Number of simultaneous client connections to the instance + superuser_reserved_connections value | The value specified is also used to restrict the number of connections from client applications and the number of connections for the management of instances. Refer to "When an Instance was Created with the initdb Command" in the Installation and Setup Guide for Server, and "Connections and Authentication" in the PostgreSQL Documentation, for details. |
superuser_reserved_connections | Add the number of simultaneous executions of mc_ctl status (*1) + 2 | Specify the number of connections reserved for connections from database superusers. Add the number of connections from Mirroring Controller processes. Also reflect the added value in the max_connections parameter. |
restart_after_crash | off | If "on" is specified, or the default value is used for this parameter, behavior equivalent to restarting Fujitsu Enterprise Postgres, including crash recovery, will be performed when some server processes end abnormally. However, when database multiplexing monitoring is used, a failover will occur after an error is detected when some server processes end abnormally, and the restart of those server processes is forcibly stopped. Specify "off" to prevent behavior such as this from occurring for no apparent reason. |
synchronous_commit | on or remote_apply | Specify up to what position WAL send is to be performed before transaction commit processing returns a normal termination response to a client. Set "on" or "remote_apply" to prevent data loss caused by operating system or server down immediately after a switch or switch. |
primary_conninfo | 'streamingReplication ConnectionDestinationInfo' | Use single quotation marks (') to enclose the connection destination information of the streaming replication. The default value of this parameter is automatically set to postgresql.auto.conf in the procedure to run pg_basebackup for instance setup. |
recovery_target_timeline | latest | Specify "latest" so that the new standby server (original primary server) will follow the new primary server when a switch occurs. This parameter is required when the original primary server is incorporated as a new standby server after the primary server is switched. |