Correct documentation error: in 8.1 and 8.2, %p in archive and restore
authorTom Lane
Sat, 4 Nov 2006 18:20:27 +0000 (18:20 +0000)
committerTom Lane
Sat, 4 Nov 2006 18:20:27 +0000 (18:20 +0000)
command strings inserts relative not absolute path of file to process.
This is a side-effect of 2005-07-04 change that makes the server use
relative paths in general.  Noted by Bernd Helmle.

doc/src/sgml/backup.sgml
doc/src/sgml/config.sgml

index 250a0744b357aa5ca50c7942cd8b5868b07d86a3..e71b61e324c3140b6894a422610a3939279162c4 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Backup and Restore
@@ -518,8 +518,10 @@ tar -cf backup.tar /usr/local/pgsql/data
     linkend="guc-archive-command"> configuration parameter, which in practice
     will always be placed in the postgresql.conf file.
     In this string,
-    any %p is replaced by the absolute path of the file to
+    any %p is replaced by the path name of the file to
     archive, while any %f is replaced by the file name only.
+    (The path name is relative to the working directory of the server,
+    i.e., the cluster's data directory.)
     Write %% if you need to embed an actual %
     character in the command.  The simplest useful command is something
     like
@@ -915,7 +917,9 @@ SELECT pg_stop_backup();
     WAL file segments.  Like the archive_command, this is
     a shell command string.  It may contain %f, which is
     replaced by the name of the desired log file, and %p,
-    which is replaced by the absolute path to copy the log file to.
+    which is replaced by the path name to copy the log file to.
+    (The path name is relative to the working directory of the server,
+    i.e., the cluster's data directory.)
     Write %% if you need to embed an actual %
     character in the command.  The simplest useful command is
     something like
@@ -1003,8 +1007,10 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
         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 absolute path to copy
+        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. 
        
index 37e50a9b9266875de7b66a639811b6b81c7d1236..8f0058b7ee8c1fc754ba25ec3fb44760a218a590 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
   Server Configuration
@@ -1573,9 +1573,11 @@ SET ENABLE_SEQSCAN TO OFF;
         The shell command to execute to archive a completed segment of
         the WAL file series. If this is an empty string (the default),
         WAL archiving is disabled. Any %p in the string is
-        replaced by the absolute path of the file to archive, and any
-        %f is replaced by the file name only. Use
-        %% to embed an actual % character in the
+        replaced by the path name of the file to archive, and any
+        %f is replaced by the file name only.
+        (The path name is relative to the working directory of the server,
+        i.e., the cluster's data directory.)
+        Use %% to embed an actual % character in the
         command. For more information see 
         linkend="backup-archiving-wal">.
         This parameter can only be set in the postgresql.conf