X-Original-To: pgsql-patches-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B2E35D1B16A for ; Sun, 18 Jul 2004 02:04:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 05629-05 for ; Sun, 18 Jul 2004 05:04:48 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id D8199D1B178 for ; Sun, 18 Jul 2004 02:04:40 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i6I54hYO025996; Sun, 18 Jul 2004 01:04:43 -0400 (EDT) To: Bruce Momjian Cc: Simon Riggs , pgsql-patches@postgresql.org Subject: Re: [HACKERS] Point in Time Recovery In-reply-to: <200407172015.i6HKFLK17349@candle.pha.pa.us> References: <200407172015.i6HKFLK17349@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Sat, 17 Jul 2004 16:15:21 -0400" Date: Sun, 18 Jul 2004 01:04:43 -0400 Message-ID: <25995.1090127083@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/291 X-Sequence-Number: 11961 Bruce Momjian 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