Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 34AC9B5DBCE for ; Fri, 17 Jun 2011 15:05:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 84008-09 for ; Fri, 17 Jun 2011 18:04:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id D2537B5D801 for ; Fri, 17 Jun 2011 15:04:57 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p5HI4u0W020655; Fri, 17 Jun 2011 14:04:56 -0400 (EDT) To: John Rouillard cc: Tim , pgsql-admin@postgresql.org Subject: Re: archive_command vs. cp -i In-reply-to: <20110617172650.GG26732@renesys.com> References: <20110617084057.238070@gmx.net> <4DFB3B68020000250003E7EA@gw.wicourts.gov> <20110617172650.GG26732@renesys.com> Comments: In-reply-to John Rouillard message dated "Fri, 17 Jun 2011 17:26:50 -0000" Date: Fri, 17 Jun 2011 14:04:56 -0400 Message-ID: <20654.1308333896@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/111 X-Sequence-Number: 37737 John Rouillard writes: >> On Fri, Jun 17, 2011 at 12:32 PM, Kevin Grittner >> Kevin.Grittner@wicourts.gov> wrote: >>>> This could be reproduced on CentOS 5.6, RHEL4, and Ubuntu 10.04. >>> I've confirmed on SLES 10 and Ubuntu 9, too. > Not really surprising since choosing to not copy a file isn't really > an indication of an error when copying a file so... > I get the same result (0 exit status) on solaris 8 and solaris 10 with > /bin/cp. I wonder what platform the example worked on. cp does behave as the example suggests for me, on OS X and HPUX. I suspect Bruce tested it on some BSD variant before putting it in the docs. That would suggest that it probably works that way on most (all?) BSDen. Still, if the GNU version doesn't act that way, we have a problem. The test-and-cp approach seems the most likely to be portable. regards, tom lane