]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Correct documentation error: in 8.1 and 8.2, %p in archive and restore
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 4 Nov 2006 18:20:40 +0000 (18:20 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 4 Nov 2006 18:20:40 +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 39168deda50662426415e5289c221828886aebac..e8f093d4f011ff717313684b1f3decd85d127bcb 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.75.2.1 2006/02/24 14:03:11 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.75.2.2 2006/11/04 18:20:40 tgl Exp $
 -->
 <chapter id="backup">
  <title>Backup and Restore</title>
@@ -501,8 +501,10 @@ tar -cf backup.tar /usr/local/pgsql/data
     linkend="guc-archive-command"> configuration parameter, which in practice
     will always be placed in the <filename>postgresql.conf</filename> file.
     In this string,
-    any <literal>%p</> is replaced by the absolute path of the file to
+    any <literal>%p</> is replaced by the path name of the file to
     archive, while any <literal>%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 <literal>%%</> if you need to embed an actual <literal>%</>
     character in the command.  The simplest useful command is something
     like
@@ -882,7 +884,9 @@ SELECT pg_stop_backup();
     WAL file segments.  Like the <varname>archive_command</>, this is
     a shell command string.  It may contain <literal>%f</>, which is
     replaced by the name of the desired log file, and <literal>%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 <literal>%%</> if you need to embed an actual <literal>%</>
     character in the command.  The simplest useful command is
     something like
@@ -956,8 +960,10 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
         the WAL file series. This parameter is required.
         Any <literal>%f</> in the string is
         replaced by the name of the file to retrieve from the archive,
-        and any <literal>%p</> is replaced by the absolute path to copy
+        and any <literal>%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 <literal>%%</> to embed an actual <literal>%</> character
         in the command. 
        </para>
index bd0c8a6dcc9574d7004faa83da46b9af4bfe7600..75da5f2bfd927bbe42dd0494767f32273569e6f3 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.36.2.6 2006/05/21 20:11:02 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.36.2.7 2006/11/04 18:20:40 tgl Exp $
 -->
 <chapter Id="runtime-config">
   <title>Server Configuration</title>
@@ -1496,9 +1496,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 <literal>%p</> in the string is
-        replaced by the absolute path of the file to archive, and any
-        <literal>%f</> is replaced by the file name only. Use
-        <literal>%%</> to embed an actual <literal>%</> character in the
+        replaced by the path name of the file to archive, and any
+        <literal>%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 <literal>%%</> to embed an actual <literal>%</> character in the
         command. For more information see <xref
         linkend="backup-archiving-wal">. This option can only be set at
         server start or in the <filename>postgresql.conf</filename>