pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-patches@postgresql.org
Subject: Re: [HACKERS] Point in Time Recovery
Date: Sun, 18 Jul 2004 01:04:43 -0400
Message-ID: <25995.1090127083@sss.pgh.pa.us> (raw)
In-Reply-To: <200407172015.i6HKFLK17349@candle.pha.pa.us>
References: <200407172015.i6HKFLK17349@candle.pha.pa.us>

Bruce Momjian <pgman@candle.pha.pa.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



view thread (111+ messages)  latest in thread

Message-ID: <25995.1090127083@sss.pgh.pa.us>
Permalink:  ../25995.1090127083@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25995.1090127083@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us, simon@2ndquadrant.com, pgsql-patches@postgresql.org
  Subject: Re: [HACKERS] Point in Time Recovery
  In-Reply-To: <25995.1090127083@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox