BUG #3877: Doc Clarification: archive_command and restore_command replacements

Started by Kevin Huntover 18 years ago4 messagesbugs
Jump to latest
#1Kevin Hunt
kevin@centropy.com

The following bug has been logged online:

Bug reference: 3877
Logged by: Kevin Hunt
Email address: kevin@centropy.com
PostgreSQL version: 8.2.6
Operating system: n/a
Description: Doc Clarification: archive_command and restore_command
replacements
Details:

When describing archive_command and restore_command (Chapter 23 - Backup and
Restore), the replacement strings '%p' and '%f' are explained:

"In this string, any %p is replaced by the path name of the file to archive,
while any %f is replaced by the file name only."

The description of %p is misleading since it is replaced with not just the
path, but also filename. The way it is written now, one might expect the
string "%p/%f" to resolve to the full path and filename of the file.
However, "%p" is sufficient.

A small change in the sentence would clarify:
"In this string, any %p is replaced by the full path and file name of the
file to archive, while any %f is replaced by the file name only."

An example showing how the sample commands would be expanded would also
help:

---
The simplest useful command is something like
archive_command = 'cp -i %p /mnt/server/archivedir/%f </dev/null'

The above example might be expanded to
cp -i /var/lib/postgresql/8.2/main/pgdata/pg_xlog/00000001000000A900000065
/mnt/server/archivedir/00000001000000A900000065 </dev/null

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kevin Hunt (#1)
Re: BUG #3877: Doc Clarification: archive_command and restore_command replacements

"Kevin Hunt" <kevin@centropy.com> writes:

The description of %p is misleading since it is replaced with not just the
path, but also filename.

Hm? "Path name" includes the file name in all usages I know about.

An example showing how the sample commands would be expanded would also
help:

That sounds reasonable.

regards, tom lane

#3Simon Riggs
simon@2ndQuadrant.com
In reply to: Tom Lane (#2)
Re: BUG #3877: Doc Clarification: archive_command and restore_command replacements

On Tue, 2008-01-15 at 14:50 -0500, Tom Lane wrote:

"Kevin Hunt" <kevin@centropy.com> writes:

The description of %p is misleading since it is replaced with not just the
path, but also filename.

Hm? "Path name" includes the file name in all usages I know about.

Agreed.

An example showing how the sample commands would be expanded would also
help:

That sounds reasonable.

Yep, I'll scan the docs and submit a patch, unless Tom has already.

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Simon Riggs (#3)
Re: BUG #3877: Doc Clarification: archive_command and restore_command replacements

Simon Riggs <simon@2ndquadrant.com> writes:

That sounds reasonable.

Yep, I'll scan the docs and submit a patch, unless Tom has already.

I have not --- go for it.

regards, tom lane