FAQ

On Fri, 2004-07-09 at 12:53, Klaus Naumann wrote:
archive_program is provided with a string which contains the target directory.
That doesn't really make sense.
archive_dest is used for both archive and restore, thats why its set as
a separate parameter.

Thats the rationale...lets see what others think
First of all it introduces the problem you
mentioned in the README file (if the directory doesn't exist you loose
xlogs).
Your example quoted later is the answer....
use
archive_dest = '/mnt/pgarch/'
rather than
archive_dest = '/mnt/pgarch'
which is ambiguous...
I thought about checking if this is a dir within the code. But
this would make things too unfelxible.
Yes, otherwise the check would be there
Second, we could make the user responsible of what he's doing by not
giving him any target.
Remember, the user is specifying the archive_dest also, so the user is
completely responsible for how archiving actually occurs.
Like you could then do things like:

archive_program = 'gzip -d %s | tar rf /dev/nst0 - '
archive_program = 'gzip -d %s | tar rf %s - '

would be how I would use it in the example you give
Which adds the file to a tar archive on his tape.
If he wants to archive it on disk, let him do it this way:

archive_program = 'cp %s /mnt/pgarch/'
archive_program = 'cp %s %s'

would be the way to specify that...

Thank you very much for feedback and your other contributions,

Best regards, Simon Riggs

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 15 | next ›
Discussion Overview
grouppgsql-patches @
categoriespostgresql
postedJul 8, '04 at 6:12p
activeDec 3, '04 at 4:47a
posts15
users4
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase