Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Point in Time Recovery

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Point in Time Recovery
Date: 2004-07-18 05:04:43
Message-ID: 25995.1090127083@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-hackerspgsql-patches
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> So you want to merge them all into a single command string.  That does
> seem less error-prone.  I see a few variables that turn off
> when set to '' like unix_socket_*.  How would this command string work? 
> How do you specify the WAL file name to transfer?

No different from before, necessarily.  However I did not like the
restriction to a single %s in the submitted implementation.  What I
have in my local copy is
	%p -> full path of XLOG file to be archived
	%f -> base name of XLOG file to be archived
and the suggested example becomes
	archive_command = 'cp %p /mnt/server/pgarchive/%f'

Note that this example immediately eliminates one of the failure modes
Simon enumerates in his README, which is to try 'cp %s /foo' where /foo
isn't a directory.  More generally, though, *only* a cp-to-directory
solution is likely to be very happy with not being able to get at the
base file name.  Yes you can make a shellscript and use basename,
but I don't think you should have to do that if it could otherwise
be a one-liner.

(In case it's not obvious from the above, I am hacking with intent to
commit soon.  Maybe tomorrow, if my wife doesn't make me paint the
bathroom instead...)

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-07-18 05:16:17
Subject: Re: NT + deadlock intended behaviour ?
Previous:From: Alvaro HerreraDate: 2004-07-18 03:06:07
Subject: Re: NT and aborted transaction

pgsql-admin by date

Next:From: Mark KirkwoodDate: 2004-07-18 05:50:11
Subject: PITR COPY Failure (was Point in Time Recovery)
Previous:From: Andrew LazarusDate: 2004-07-18 02:00:38
Subject: Re: [ADMIN] Migrate postgres databases from SQL_ASCII to UNICODE

pgsql-patches by date

Next:From: Alvaro HerreraDate: 2004-07-18 05:48:30
Subject: Re: [subxacts] Savepoint syntax
Previous:From: Matthew T. O'ConnorDate: 2004-07-18 02:09:15
Subject: autovacuum integration attempt #3

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group