- publishing free software manuals
PostgreSQL Reference Manual - Volume 3 - Server Administration Guide
by The PostgreSQL Global Development Group
Paperback (6"x9"), 204 pages
ISBN 0954612043
RRP £13.95 ($24.95)

Sales of this book support the PostgreSQL project! Get a printed copy>>>

10.3.3.1 Recovery Settings

These settings can only be made in the ‘recovery.conf’ file, and apply only for the duration of the recovery. They must be reset for any subsequent recovery you wish to perform. They cannot be changed once recovery has begun.

restore_command (string)
The shell command to execute to retrieve an archived segment of the WAL file series. This parameter is required. Any %f in the string is replaced by the name of the file to retrieve from the archive, and any %p is replaced by the path name to copy it to on the server. (The path name is relative to the working directory of the server, i.e., the cluster's data directory.) Write %% to embed an actual % character in the command. It is important for the command to return a zero exit status if and only if it succeeds. The command will be asked for file names that are not present in the archive; it must return nonzero when so asked. Examples:
restore_command = 'cp /mnt/server/archivedir/%f "%p"'
restore_command = 'copy /mnt/server/archivedir/%f "%p"' 
 # Windows
recovery_target_time (timestamp)
This parameter specifies the time stamp up to which recovery will proceed. At most one of recovery_target_time and recovery_target_xid can be specified. The default is to recover to the end of the WAL log. The precise stopping point is also influenced by recovery_target_inclusive.
recovery_target_xid (string)
This parameter specifies the transaction ID up to which recovery will proceed. Keep in mind that while transaction IDs are assigned sequentially at transaction start, transactions can complete in a different numeric order. The transactions that will be recovered are those that committed before (and optionally including) the specified one. At most one of recovery_target_xid and recovery_target_time can be specified. The default is to recover to the end of the WAL log. The precise stopping point is also influenced by recovery_target_inclusive.
recovery_target_inclusive (boolean)
Specifies whether we stop just after the specified recovery target (true), or just before the recovery target (false). Applies to both recovery_target_time and recovery_target_xid, whichever one is specified for this recovery. This indicates whether transactions having exactly the target commit time or ID, respectively, will be included in the recovery. Default is true.
recovery_target_timeline (string)
Specifies recovering into a particular timeline. The default is to recover along the same timeline that was current when the base backup was taken. You would only need to set this parameter in complex re-recovery situations, where you need to return to a state that itself was reached after a point-in-time recovery. See section 10.3.4 Timelines for discussion.
ISBN 0954612043PostgreSQL Reference Manual - Volume 3 - Server Administration GuideSee the print edition