1 # -------------------------------
2 # PostgreSQL recovery config file
3 # -------------------------------
5 # Edit this file to provide the parameters that PostgreSQL needs to
6 # perform an archive recovery of a database, or to act as a replication
9 # If "recovery.conf" is present in the PostgreSQL data directory, it is
10 # read on postmaster startup. After successful recovery, it is renamed
11 # to "recovery.done" to ensure that we do not accidentally re-enter
12 # archive recovery or standby mode.
14 # This file consists of lines of the form:
18 # Comments are introduced with '#'.
20 # The complete list of option names and allowed values can be found
21 # in the PostgreSQL documentation.
23 #---------------------------------------------------------------------------
24 # ARCHIVE RECOVERY PARAMETERS
25 #---------------------------------------------------------------------------
29 # specifies the shell command that is executed to copy log files
30 # back from archival storage. The command string may contain %f,
31 # which is replaced by the name of the desired log file, and %p,
32 # which is replaced by the absolute path to copy the log file to.
34 # This parameter is *required* for an archive recovery, but optional
35 # for streaming replication.
37 # It is important that the command return nonzero exit status on failure.
38 # The command *will* be asked for log files that are not present in the
39 # archive; it must return nonzero when so asked.
41 # NOTE that the basename of %p will be different from %f; do not
42 # expect them to be interchangeable.
44 #restore_command = '' # e.g. 'cp /mnt/server/archivedir/%f %p'
47 # archive_cleanup_command
49 # specifies an optional shell command to execute at every restartpoint.
50 # This can be useful for cleaning up the archive of a standby server.
52 #archive_cleanup_command = ''
54 # recovery_end_command
56 # specifies an optional shell command to execute at completion of recovery.
57 # This can be useful for cleaning up after the restore_command.
59 #recovery_end_command = ''
61 #---------------------------------------------------------------------------
62 # RECOVERY TARGET PARAMETERS
63 #---------------------------------------------------------------------------
65 # By default, recovery will rollforward to the end of the WAL log.
66 # If you want to stop rollforward at a specific point, you
67 # must set a recovery target.
69 # You may set a recovery target either by transactionId, by name,
70 # or by timestamp. Recovery may either include or exclude the
71 # transaction(s) with the recovery target value (ie, stop either
72 # just after or just before the given target, respectively).
75 #recovery_target_name = '' # e.g. 'daily backup 2011-01-26'
77 #recovery_target_time = '' # e.g. '2004-07-14 22:39:00 EST'
79 #recovery_target_xid = ''
81 #recovery_target_inclusive = true
84 # Alternatively, you can request stopping as soon as a consistent state
85 # is reached, by uncommenting this option.
87 #recovery_target = 'immediate'
90 # If you want to recover into a timeline other than the "main line" shown in
91 # pg_control, specify the timeline number here, or write 'latest' to get
92 # the latest branch for which there's a history file.
94 #recovery_target_timeline = 'latest'
97 # If recovery_target_action = 'pause', recovery will pause when the
98 # recovery target is reached. The pause state will continue until
99 # pg_xlog_replay_resume() is called. This setting has no effect if
100 # no recovery target is set. If hot_standby is not enabled then the
101 # server will shutdown instead, though you may request this in
102 # any case by specifying 'shutdown'.
104 #recovery_target_action = 'pause'
106 #---------------------------------------------------------------------------
107 # STANDBY SERVER PARAMETERS
108 #---------------------------------------------------------------------------
112 # When standby_mode is enabled, the PostgreSQL server will work as a
113 # standby. It will continuously wait for the additional XLOG records, using
114 # restore_command and/or primary_conninfo.
120 # If set, the PostgreSQL server will try to connect to the primary using this
121 # connection string and receive XLOG records continuously.
123 #primary_conninfo = '' # e.g. 'host=localhost port=5432'
125 # If set, the PostgreSQL server will use the specified replication slot when
126 # connecting to the primary via streaming replication to control resource
127 # removal on the upstream node. This setting has no effect if primary_conninfo
130 #primary_slot_name = ''
132 # By default, a standby server keeps restoring XLOG records from the
133 # primary indefinitely. If you want to stop the standby mode, finish recovery
134 # and open the system in read/write mode, specify a path to a trigger file.
135 # The server will poll the trigger file path periodically and start as a
136 # primary server when it's found.
140 # By default, a standby server restores XLOG records from the primary as
141 # soon as possible. If you want to explicitly delay the replay of committed
142 # transactions from the master, specify a minimum apply delay. For example,
143 # if you set this parameter to 5min, the standby will replay each transaction
144 # commit only when the system time on the standby is at least five minutes
145 # past the commit time reported by the master.
147 #recovery_min_apply_delay = 0
149 #---------------------------------------------------------------------------
150 # HOT STANDBY PARAMETERS
151 #---------------------------------------------------------------------------
153 # Hot Standby related parameters are listed in postgresql.conf
155 #---------------------------------------------------------------------------