Re: PITR Archive Recovery plus WIP PITR - Mailing list pgsql-patches

From Simon Riggs
Subject Re: PITR Archive Recovery plus WIP PITR
Date
Msg-id 1089401918.17493.618.camel@stromboli
Whole thread Raw
In response to PITR Archive Recovery plus WIP PITR  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-patches
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


pgsql-patches by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Digital Mars C++ - Clients
Next
From: Bruce Momjian
Date:
Subject: fix schema ownership on first connection preliminary patch v2