Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T2TFv-0006HW-8v for pgsql-docs@postgresql.org; Fri, 17 Aug 2012 20:34:55 +0000 Received: from oproxy12-pub.bluehost.com ([50.87.16.10]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1T2TFr-0002Wq-RS for pgsql-docs@postgresql.org; Fri, 17 Aug 2012 20:34:54 +0000 Received: (qmail 23167 invoked by uid 0); 17 Aug 2012 20:34:28 -0000 Received: from unknown (HELO host159.hostmonster.com) (74.220.207.159) by oproxy12.bluehost.com with SMTP; 17 Aug 2012 20:34:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=timbira.com; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=9ptHVHpdykiBLdM6dTuLsO3gDrunJXA4lyqo23OpEzk=; b=dZttY8jwOPi8UTLoHocjLXOB/HwQrJxjN2yQvdeRAcqi8O8fgzJmh2a8wEYTCT2YDORVfNraRUMc45hs478T3tNg6g+IeH4UXnOobB/D5SFO1drHVlSUfKz2VSuSw6SE; Received: from [200.163.159.79] (port=63180 helo=[10.3.2.3]) by host159.hostmonster.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76) (envelope-from ) id 1T2TFS-000184-E7; Fri, 17 Aug 2012 14:34:27 -0600 Message-ID: <502EA9C2.2030100@timbira.com> Date: Fri, 17 Aug 2012 17:29:54 -0300 From: Euler Taveira User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120624 Icedove/10.0.5 MIME-Version: 1.0 To: Peter Eisentraut CC: Bruce Momjian , Josh Kupershmidt , Greg Smith , pgsql-docs@postgresql.org Subject: Re: somewhat wrong archive_command example References: <1316524671.9044.12.camel@fsopti579.F-Secure.com> <4E794FB5.80400@2ndQuadrant.com> <1316613536.14119.6.camel@fsopti579.F-Secure.com> <4E7A6D0D.4060106@2ndQuadrant.com> <4E7A887F.8010908@timbira.com> <20120816011347.GF8353@momjian.us> <502EA0D0.10004@gmx.net> In-Reply-To: <502EA0D0.10004@gmx.net> X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Identified-User: {1651:host159.hostmonster.com:timbirac:timbira.com} {sentby:smtp auth 200.163.159.79 authed with euler@timbira.com} X-Pg-Spam-Score: -2.0 (--) X-Archive-Number: 201208/33 X-Sequence-Number: 7426 On 17-08-2012 16:51, Peter Eisentraut wrote: > Btw., is anyone else concerned about using plain cp for this? If the cp fails > half-way, it leaves a partial file around, but subsequent file existence > checks will find the file OK and skip it. > I've already faced this problem (with cp and scp). > I have occasionally used some combination of mktemp + cp + mv, which seems to > work around this problem. > That's what rsync uses, no? Your suggestion or rsync seem safe options to me. But if you insist on an academic example using cp, at least comment that it can fail in some cases. -- Euler Taveira de Oliveira - Timbira http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento