@@ -152,16 +152,18 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
152
152
<sect1 id="recovery-target-settings">
153
153
154
154
<title>Recovery Target Settings</title>
155
+
155
156
<para>
156
157
By default, recovery will recover to the end of the WAL log. The
157
158
following parameters can be used to specify an earlier stopping point.
158
159
At most one of <varname>recovery_target</>,
159
160
<varname>recovery_target_name</>, <varname>recovery_target_time</>, or
160
- <varname>recovery_target_xid</> can be specified.
161
+ <varname>recovery_target_xid</> can be used; if more than one of these
162
+ is specified in the configuration file, the last entry will be used.
161
163
</para>
162
- <variablelist>
163
164
164
- <varlistentry id="recovery-target" xreflabel="recovery_target_name">
165
+ <variablelist>
166
+ <varlistentry id="recovery-target" xreflabel="recovery_target">
165
167
<term><varname>recovery_target</varname><literal> = 'immediate'</literal>
166
168
<indexterm>
167
169
<primary><varname>recovery_target</> recovery parameter</primary>
@@ -189,8 +191,8 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
189
191
</term>
190
192
<listitem>
191
193
<para>
192
- This parameter specifies the named restore point, created with
193
- <function>pg_create_restore_point()</> to which recovery will proceed.
194
+ This parameter specifies the named restore point ( created with
195
+ <function>pg_create_restore_point()</>) to which recovery will proceed.
194
196
</para>
195
197
</listitem>
196
198
</varlistentry>
@@ -231,13 +233,13 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
231
233
</listitem>
232
234
</varlistentry>
233
235
</variablelist>
236
+
234
237
<para>
235
238
The following options further specify the recovery target, and affect
236
239
what happens when the target is reached:
237
240
</para>
238
241
239
242
<variablelist>
240
-
241
243
<varlistentry id="recovery-target-inclusive"
242
244
xreflabel="recovery_target_inclusive">
243
245
<term><varname>recovery_target_inclusive</varname> (<type>boolean</type>)
@@ -247,12 +249,12 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
247
249
</term>
248
250
<listitem>
249
251
<para>
250
- Specifies whether we stop just after the specified recovery target
252
+ Specifies whether to stop just after the specified recovery target
251
253
(<literal>true</literal>), or just before the recovery target
252
254
(<literal>false</literal>).
253
- Applies to both <xref linkend="recovery-target-time">
254
- and <xref linkend="recovery-target-xid">, whichever one is
255
- specified for this recovery. This indicates whether transactions
255
+ Applies when either <xref linkend="recovery-target-time">
256
+ or <xref linkend="recovery-target-xid"> is specified.
257
+ This setting controls whether transactions
256
258
having exactly the target commit time or ID, respectively, will
257
259
be included in the recovery. Default is <literal>true</>.
258
260
</para>
@@ -280,27 +282,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
280
282
</listitem>
281
283
</varlistentry>
282
284
283
- <varlistentry id="pause-at-recovery-target"
284
- xreflabel="pause_at_recovery_target">
285
- <term><varname>pause_at_recovery_target</varname> (<type>boolean</type>)
286
- <indexterm>
287
- <primary><varname>pause_at_recovery_target</> recovery parameter</primary>
288
- </indexterm>
289
- </term>
290
- <listitem>
291
- <para>
292
- Alias for recovery_target_action, <literal>true</> is same as
293
- recovery_target_action = <literal>pause</> and <literal>false</>
294
- is same as recovery_target_action = <literal>promote</>.
295
- </para>
296
- <para>
297
- This setting has no effect if <xref linkend="guc-hot-standby"> is not
298
- enabled, or if no recovery target is set.
299
- </para>
300
- </listitem>
301
- </varlistentry>
302
-
303
- <varlistentry id="action-at-recovery-target"
285
+ <varlistentry id="recovery-target-action"
304
286
xreflabel="recovery_target_action">
305
287
<term><varname>recovery_target_action</varname> (<type>enum</type>)
306
288
<indexterm>
@@ -311,35 +293,35 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
311
293
<para>
312
294
Specifies what action the server should take once the recovery target is
313
295
reached. The default is <literal>pause</>, which means recovery will
314
- be paused. <literal>promote</> means recovery process will finish and
315
- the server will start to accept connections.
296
+ be paused. <literal>promote</> means the recovery process will finish
297
+ and the server will start to accept connections.
316
298
Finally <literal>shutdown</> will stop the server after reaching the
317
299
recovery target.
318
300
</para>
319
301
<para>
320
- The intended use of <literal>pause</> setting is to allow queries to be
321
- executed against the database to check if this recovery target is the
322
- most desirable point for recovery. The paused state can be resumed by
323
- using <function>pg_xlog_replay_resume()</> (See
302
+ The intended use of the <literal>pause</> setting is to allow queries
303
+ to be executed against the database to check if this recovery target
304
+ is the most desirable point for recovery.
305
+ The paused state can be resumed by
306
+ using <function>pg_xlog_replay_resume()</> (see
324
307
<xref linkend="functions-recovery-control-table">), which then
325
308
causes recovery to end. If this recovery target is not the
326
- desired stopping point, then shutdown the server, change the
309
+ desired stopping point, then shut down the server, change the
327
310
recovery target settings to a later target and restart to
328
311
continue recovery.
329
312
</para>
330
313
<para>
331
- The <literal>shutdown</> setting is useful to have instance ready at
332
- exact replay point desired.
333
- The instance will still be able to replay more WAL records (and in fact
334
- will have to replay WAL records since last checkpoint next time it is
335
- started).
314
+ The <literal>shutdown</> setting is useful to have the instance ready
315
+ at the exact replay point desired. The instance will still be able to
316
+ replay more WAL records (and in fact will have to replay WAL records
317
+ since the last checkpoint next time it is started).
336
318
</para>
337
319
<para>
338
320
Note that because <filename>recovery.conf</> will not be renamed when
339
321
<varname>recovery_target_action</> is set to <literal>shutdown</>,
340
322
any subsequent start will end with immediate shutdown unless the
341
- configuration is changed or the <filename>recovery.conf</> is removed
342
- manually.
323
+ configuration is changed or the <filename>recovery.conf</> file is
324
+ removed manually.
343
325
</para>
344
326
<para>
345
327
This setting has no effect if no recovery target is set.
@@ -349,6 +331,28 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
349
331
</listitem>
350
332
</varlistentry>
351
333
334
+ <varlistentry id="pause-at-recovery-target"
335
+ xreflabel="pause_at_recovery_target">
336
+ <term><varname>pause_at_recovery_target</varname> (<type>boolean</type>)
337
+ <indexterm>
338
+ <primary><varname>pause_at_recovery_target</> recovery parameter</primary>
339
+ </indexterm>
340
+ </term>
341
+ <listitem>
342
+ <para>
343
+ This is an obsolete version of <varname>recovery_target_action</>.
344
+ Setting it to <literal>true</> is the same as
345
+ <varname>recovery_target_action</> = <literal>pause</>,
346
+ while <literal>false</> is the same as
347
+ <varname>recovery_target_action</> = <literal>promote</>.
348
+ </para>
349
+ <para>
350
+ This setting has no effect if <xref linkend="guc-hot-standby"> is not
351
+ enabled, or if no recovery target is set.
352
+ </para>
353
+ </listitem>
354
+ </varlistentry>
355
+
352
356
</variablelist>
353
357
</sect1>
354
358
0 commit comments