Options
-k numfiles
- Cleanup files in the archive so that we maintain no more
- than this many files in the archive.
+ Cleanup files in the archive so that we maintain no more than this
+ many files in the archive. This parameter will be silently ignored if
+ RESTARTWALFILE is specified, since that
+ specification method is more accurate in determining the correct
+ cut-off point in archive.
You should be wary against setting this number too low,
It is wholly unrelated to the setting of checkpoint_segments
on either primary or standby.
+ Setting numfiles to be zero will disable deletion
+ of files from ARCHIVELOCATION.
+
If in doubt, use a large value or do not set a value at all.
+ If you specify neither RESTARTWALFILE> nor -k>,
+ then -k 0> will be assumed, i.e. keep all files in archive.
+
|
WAL files will remain in archive
- Link is more efficient, but the default is copy to
- allow you to maintain the WAL archive for recovery
- purposes as well as high-availability.
+ Link is more efficient, but the default is copy to allow you to
+ maintain the WAL archive for recovery purposes as well as
+ high-availability. The default setting is not necessarily recommended,
+ consult the main database server manual for discussion.
This option uses the Windows Vista command mklink
we will wait 5 secs, 10 secs then 15 secs before reporting
the failure back to the database server. This will be
interpreted as and end of recovery and the Standby will come
- up fully as a result. Default=3
+ up fully as a result. Default=3 Min=0
if the file to be restored is available in the archive yet.
The default setting is not necessarily recommended,
consult the main database server manual for discussion.
- Default=5
+ Default=5, Min=1, Max=60
|
the maximum number of seconds to wait for the next file,
after which recovery will end and the Standby will come up.
The default setting is not necessarily recommended,
- consult the main database server manual for discussion.
- Default=0
+ consult the main database server manual for discussion. A setting of
+ zero means wait forever.
+ Default=0, Min=0
+
+
Supported versions
+ pg_standby is designed to work with PostgreSQL 8.2 and
+ and later. It is currently compatible across minor changes between the way
+ 8.3 and 8.2 operate.
+
+ PostgreSQL 8.3 provides the %r command line substitution,
+ designed to let pg_standby know the last file it needs to
+ keep. If the last parameter is omitted, no error is generated, allowing
+ pg_standby to function correctly with PostgreSQL 8.2
+ also. With PostgreSQL 8.2, the -k option must be used if
+ archive cleanup is required. This option remains available in 8.3.
+
+
+
+
+
Additional design notes
+ The use of a move command seems like it would be a good idea, but this would
+ prevent recovery from being restartable. Also, the last WAL file is always
+ requested twice from the archive.
+
+
+
Examples
*not* in the restore_command, in 8.2, 8.1, 8.0 on Windows.
-restore_command = 'pg_standby -c -d -s 5 -w 0 -t C:\pgsql.trigger.5442
- ..\archive %f %p 2>> standby.log'
+restore_command = 'pg_standby -c -d -s 5 -w 0 -t C:\pgsql.trigger.5442 ..\archive %f %p 2>> standby.log'
which will