Skip to content

Commit 6fada49

Browse files
committed
Correct documentation error: in 8.1 and 8.2, %p in archive and restore
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.
1 parent 17a814c commit 6fada49

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

doc/src/sgml/backup.sgml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.92 2006/10/30 00:08:02 neilc Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.93 2006/11/04 18:20:27 tgl Exp $ -->
22

33
<chapter id="backup">
44
<title>Backup and Restore</title>
@@ -518,8 +518,10 @@ tar -cf backup.tar /usr/local/pgsql/data
518518
linkend="guc-archive-command"> configuration parameter, which in practice
519519
will always be placed in the <filename>postgresql.conf</filename> file.
520520
In this string,
521-
any <literal>%p</> is replaced by the absolute path of the file to
521+
any <literal>%p</> is replaced by the path name of the file to
522522
archive, while any <literal>%f</> is replaced by the file name only.
523+
(The path name is relative to the working directory of the server,
524+
i.e., the cluster's data directory.)
523525
Write <literal>%%</> if you need to embed an actual <literal>%</>
524526
character in the command. The simplest useful command is something
525527
like
@@ -915,7 +917,9 @@ SELECT pg_stop_backup();
915917
WAL file segments. Like the <varname>archive_command</>, this is
916918
a shell command string. It may contain <literal>%f</>, which is
917919
replaced by the name of the desired log file, and <literal>%p</>,
918-
which is replaced by the absolute path to copy the log file to.
920+
which is replaced by the path name to copy the log file to.
921+
(The path name is relative to the working directory of the server,
922+
i.e., the cluster's data directory.)
919923
Write <literal>%%</> if you need to embed an actual <literal>%</>
920924
character in the command. The simplest useful command is
921925
something like
@@ -1003,8 +1007,10 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
10031007
the WAL file series. This parameter is required.
10041008
Any <literal>%f</> in the string is
10051009
replaced by the name of the file to retrieve from the archive,
1006-
and any <literal>%p</> is replaced by the absolute path to copy
1010+
and any <literal>%p</> is replaced by the path name to copy
10071011
it to on the server.
1012+
(The path name is relative to the working directory of the server,
1013+
i.e., the cluster's data directory.)
10081014
Write <literal>%%</> to embed an actual <literal>%</> character
10091015
in the command.
10101016
</para>

doc/src/sgml/config.sgml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.92 2006/10/23 18:10:30 petere Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.93 2006/11/04 18:20:27 tgl Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -1573,9 +1573,11 @@ SET ENABLE_SEQSCAN TO OFF;
15731573
The shell command to execute to archive a completed segment of
15741574
the WAL file series. If this is an empty string (the default),
15751575
WAL archiving is disabled. Any <literal>%p</> in the string is
1576-
replaced by the absolute path of the file to archive, and any
1577-
<literal>%f</> is replaced by the file name only. Use
1578-
<literal>%%</> to embed an actual <literal>%</> character in the
1576+
replaced by the path name of the file to archive, and any
1577+
<literal>%f</> is replaced by the file name only.
1578+
(The path name is relative to the working directory of the server,
1579+
i.e., the cluster's data directory.)
1580+
Use <literal>%%</> to embed an actual <literal>%</> character in the
15791581
command. For more information see <xref
15801582
linkend="backup-archiving-wal">.
15811583
This parameter can only be set in the <filename>postgresql.conf</>

0 commit comments

Comments
 (0)