]> granicus.if.org Git - postgresql/blob - src/backend/access/transam/recovery.conf.sample
Reduce pinning and buffer content locking for btree scans.
[postgresql] / src / backend / access / transam / recovery.conf.sample
1 # -------------------------------
2 # PostgreSQL recovery config file
3 # -------------------------------
4 #
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
7 # standby.
8 #
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.
13 #
14 # This file consists of lines of the form:
15 #
16 #   name = value
17 #
18 # Comments are introduced with '#'.
19 #
20 # The complete list of option names and allowed values can be found
21 # in the PostgreSQL documentation.
22 #
23 #---------------------------------------------------------------------------
24 # ARCHIVE RECOVERY PARAMETERS
25 #---------------------------------------------------------------------------
26 #
27 # restore_command
28 #
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.
33 #
34 # This parameter is *required* for an archive recovery, but optional
35 # for streaming replication.
36 #
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.
40 #
41 # NOTE that the basename of %p will be different from %f; do not
42 # expect them to be interchangeable.
43 #
44 #restore_command = ''           # e.g. 'cp /mnt/server/archivedir/%f %p'
45 #
46 #
47 # archive_cleanup_command
48 #
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.
51 #
52 #archive_cleanup_command = ''
53 #
54 # recovery_end_command
55 #
56 # specifies an optional shell command to execute at completion of recovery.
57 # This can be useful for cleaning up after the restore_command.
58 #
59 #recovery_end_command = ''
60 #
61 #---------------------------------------------------------------------------
62 # RECOVERY TARGET PARAMETERS
63 #---------------------------------------------------------------------------
64 #
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.
68 #
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).
73 #
74 #
75 #recovery_target_name = ''      # e.g. 'daily backup 2011-01-26'
76 #
77 #recovery_target_time = ''      # e.g. '2004-07-14 22:39:00 EST'
78 #
79 #recovery_target_xid = ''
80 #
81 #recovery_target_inclusive = true
82 #
83 #
84 # Alternatively, you can request stopping as soon as a consistent state
85 # is reached, by uncommenting this option.
86 #
87 #recovery_target = 'immediate'
88 #
89 #
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.
93 #
94 #recovery_target_timeline = 'latest'
95 #
96 #
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'.
103 #
104 #recovery_target_action = 'pause'
105 #
106 #---------------------------------------------------------------------------
107 # STANDBY SERVER PARAMETERS
108 #---------------------------------------------------------------------------
109 #
110 # standby_mode
111 #
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.
115 #
116 #standby_mode = off
117 #
118 # primary_conninfo
119 #
120 # If set, the PostgreSQL server will try to connect to the primary using this
121 # connection string and receive XLOG records continuously.
122 #
123 #primary_conninfo = ''          # e.g. 'host=localhost port=5432'
124 #
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
128 # is not set.
129 #
130 #primary_slot_name = ''
131 #
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.
137 #
138 #trigger_file = ''
139 #
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.
146 #
147 #recovery_min_apply_delay = 0
148 #
149 #---------------------------------------------------------------------------
150 # HOT STANDBY PARAMETERS
151 #---------------------------------------------------------------------------
152 #
153 # Hot Standby related parameters are listed in postgresql.conf
154 #
155 #---------------------------------------------------------------------------