/*
- * $PostgreSQL: pgsql/contrib/pg_standby/pg_standby.c,v 1.24 2009/06/18 10:08:08 heikki Exp $
+ * $PostgreSQL: pgsql/contrib/pg_standby/pg_standby.c,v 1.25 2009/06/25 12:03:10 heikki Exp $
*
*
* pg_standby.c
printf(" -d generate lots of debugging output (testing only)\n");
printf(" -k NUMFILESTOKEEP if RESTARTWALFILE not used, removes files prior to limit\n"
" (0 keeps all)\n");
- printf(" -l links into archive (leaves file in archive)\n");
+ printf(" -l does nothing; use of link is now deprecated\n");
printf(" -r MAXRETRIES max number of times to retry, with progressive wait\n"
" (default=3)\n");
printf(" -s SLEEPTIME seconds to wait between file checks (min=1, max=60,\n"
}
break;
case 'l': /* Use link */
- restoreCommandType = RESTORE_COMMAND_LINK;
+ /*
+ * Link feature disabled, possibly permanently. Linking
+ * causes a problem after recovery ends that is not currently
+ * resolved by PostgreSQL. 25 Jun 2009
+ restoreCommandType = RESTORE_COMMAND_LINK;
+ */
break;
case 'r': /* Retries */
maxretries = atoi(optarg);
-
+
pg_standby
pg_standby features include:
-
- Supports copy or link for restoring WAL files
-
-
Written in C, so very portable and easy to install
archive space.
- |
- -l>
- no
-
- Use ln> command to restore WAL files from archive.
- Link is more efficient than copy, but the default is copy since link
- will not work in all scenarios.
- On Windows, this option uses the mklink> command
- to provide a file-to-file symbolic link. -l> will
- not work on versions of Windows prior to Vista.
-
-
|
-r> maxretries>
3
- Set the maximum number of times to retry the copy or link command if it
+ Set the maximum number of times to retry the copy command if it
fails. After each failure, we wait for sleeptime> *
num_retries>
so that the wait time increases progressively. So by default,
archive_command = 'cp %p .../archive/%f'
-restore_command = 'pg_standby -l -d -s 2 -t /tmp/pgsql.trigger.5442 .../archive %f %p %r 2>>standby.log'
+restore_command = 'pg_standby -d -s 2 -t /tmp/pgsql.trigger.5442 .../archive %f %p %r 2>>standby.log'
recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442'
This will:
-
- use the ln> command to restore WAL files from archive
-
-
produce debugging output in standby.log>