]> granicus.if.org Git - postgresql/blob - src/backend/access/transam/recovery.conf.sample
Named restore points in recovery. Users can record named points, then
[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 # If you want to recover into a timeline other than the "main line" shown in
85 # pg_control, specify the timeline number here, or write 'latest' to get
86 # the latest branch for which there's a history file.
87 #
88 #recovery_target_timeline = 'latest'
89 #
90 #---------------------------------------------------------------------------
91 # STANDBY SERVER PARAMETERS
92 #---------------------------------------------------------------------------
93 #
94 # standby_mode
95 #
96 # When standby_mode is enabled, the PostgreSQL server will work as a
97 # standby. It will continuously wait for the additional XLOG records, using
98 # restore_command and/or primary_conninfo.
99 #
100 #standby_mode = off
101 #
102 # primary_conninfo
103 #
104 # If set, the PostgreSQL server will try to connect to the primary using this
105 # connection string and receive XLOG records continuously.
106 #
107 #primary_conninfo = ''          # e.g. 'host=localhost port=5432'
108 #
109 #
110 # By default, a standby server keeps restoring XLOG records from the
111 # primary indefinitely. If you want to stop the standby mode, finish recovery
112 # and open the system in read/write mode, specify path to a trigger file.
113 # The server will poll the trigger file path periodically and start as a
114 # primary server when it's found.
115 #
116 #trigger_file = ''
117 #
118 #---------------------------------------------------------------------------
119 # HOT STANDBY PARAMETERS
120 #---------------------------------------------------------------------------
121 #
122 # Hot Standby related parameters are listed in postgresql.conf
123 #
124 #---------------------------------------------------------------------------