Does PostgreSQL recovery.conf change need to be restarted?

Source: Internet
Author: User
Tags postgresql

The standby node was automatically promoted to a writable node when the file specified by the Trigger_file parameter was found to exist before the Pgpoll was studied. You do not need to perform pg_ctl promote manually, but this time is generally delayed because the process periodically checks the replication process.

Today, the Primary_conninfo information is changed, the replication process does not change, and the standby node needs to be restarted.

......................................................................................................................... ...

-bash-4.1$ Cat Recovery.conf.sample |more
#-------------------------------# PostgreSQL Recovery Configfile# -------------------------------# # Edit Thisfile toProvide the parameters that PostgreSQL needs to# Perform an archive recovery ofADatabase,or toAct asAReplication# standby.##If"Recovery.conf" isPresentinchThe PostgreSQL data directory, it is# Read onPostmaster startup. After successful recovery, it isrenamed# to"Recovery.done" toEnsure that we do notaccidentally re-enter# Archive RecoveryorStandby mode.## ThisfileConsists ofLines ofThe form:## name=value## Comments is introduced with '#'. # # The complete list of optionNames andAllowedValuescan be found#inchThe PostgreSQL documentation.##---------------------------------------------------------------------------# ARCHIVE RECOVERY parameters#---------------------------------------------------------------------------# # restore_command## Specifies the shell command that isExecuted toCopyLogfiles# Back fromArchival storage. The command string may contain%f,# which isReplaced byThe name ofThe desiredLog file, and %p,# which isReplaced byThe absolute path toCopy theLog file to. # # This parameter is *Required* forAn archive recovery, but optional# forStreamingReplication. # # It isImportant that commandreturnNonzeroExitStatus onfailure.# the command*Would*be asked for LogFiles that is notPresentinchthe# Archive; it mustreturnNonzero whenSo asked.## NOTE that the basename of %P'll be different from %F Do not# expect them toBe interchangeable.

#restore_command = ' # e.g. ' cp/mnt/server/archivedir/%f%p '
#
#
# Archive_cleanup_command
#
# specifies an optional shell command-to-execute at every restartpoint.
# This can is useful for cleaning up the archive of a standby server.
#
#archive_cleanup_command = "
#
# Recovery_end_command
#
# specifies an optional shell command-to-execute at completion of recovery.
# This can is useful for cleaning up after the Restore_command.
#
#recovery_end_command = "
#
#---------------------------------------------------------------------------
# RECOVERY TARGET PARAMETERS
#---------------------------------------------------------------------------
#
# By default, recovery'll rollforward to the end of the WAL log.
# If you want to stop rollforward at a specific point and you
# must set a recovery target.
#
# You could set a recovery target either by TransactionID, by name,
# or by timestamp. Recovery may either include or exclude the
# transaction (s) with the recovery target value (ie, stop either
# just after or just before the given target, respectively).
#
#
#recovery_target_name = "# e.g. ' Daily backup 2011-01-26 '
#
#recovery_target_time = ' # e.g. ' 2004-07-14 22:39:00 EST '
#
#recovery_target_xid = "
#
#recovery_target_inclusive = True
#
#
# Alternatively, can request stopping as soon as a consistent state
# is reached, by uncommenting this option.

#recovery_target = ' immediate '
#
#
# If you want to recover-a timeline other than the ' main line ' shown in
# Pg_control, specify the timeline number here, or write ' latest ' to get
# The latest branch for which there's a history file.
#
#recovery_target_timeline = ' latest '
#
#
# If recovery_target_action = ' pause ', recovery'll pause when the
# recovery target is reached. The pause state would continue until
# Pg_xlog_replay_resume () is called. This setting have no effect if
# no recovery target is set. If Hot_standby is not enabled then the
# server would shutdown instead, though
# any case by specifying ' shutdown '.
#
#recovery_target_action = ' Pause '
#
#---------------------------------------------------------------------------
# STANDBY SERVER PARAMETERS
#---------------------------------------------------------------------------
#
# Standby_mode
#
# when Standby_mode is enabled, the PostgreSQL server would work as a
# standby. It'll continuously wait for the additional XLOG records, using
# Restore_command and/or Primary_conninfo.
#
#standby_mode = Off
#
# Primary_conninfo
#
# If Set, the PostgreSQL server would try to connect to the primary using this
# connection string and receive XLOG records continuously.
#
#primary_conninfo = ' # e.g. ' Host=localhost port=5432 '
#
# If Set, the PostgreSQL server would use the specified replication slots when
# Connecting to the primary via streaming replication to control resource
# Removal on the upstream node. This setting have no effect if primary_conninfo
# is not set.
#

#primary_slot_name = "
#
# By default, a standby server keeps restoring XLOG records from the
# Primary indefinitely. If you want to stop the standby mode, finish recovery
# and open the system in Read/write mode, specify a path to a trigger file.
# The server would poll the trigger file path periodically and start as a
# Primary server when it ' s found.
#
#trigger_file = "
#
# By default, a standby server restores XLOG records from the primary as
# soon as possible. If you want to explicitly delay the replay of committed
# transactions from the master, specify a minimum apply delay. For example,
# If you set this parameter to 5min, the standby would replay each transaction
# commit only if the system time on the standby are at least five minutes
# past the commit time reported by the master.
#
#recovery_min_apply_delay = 0
#
#---------------------------------------------------------------------------
# Hot STANDBY PARAMETERS
#---------------------------------------------------------------------------
#
# Hot Standby Related parameters is listed in postgresql.conf
#
#---------------------------------------------------------------------------

Does PostgreSQL recovery.conf change need to be restarted?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.