Re: PITR Archive Recovery plus WIP PITR

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Klaus Naumann <kn(at)mgnet(dot)de>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: PITR Archive Recovery plus WIP PITR
Date: 2004-07-09 19:38:39
Message-ID: 1089401918.17493.618.camel@stromboli
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-07-09 20:42:18 fix schema ownership on first connection preliminary patch v2
Previous Message Stephan Szabo 2004-07-09 02:55:28 Re: Digital Mars C++ - Clients