Re: archive_command vs. cp -i

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Rouillard <rouilj(at)renesys(dot)com>
Cc: Tim <elatllat(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: archive_command vs. cp -i
Date: 2011-06-17 18:04:56
Message-ID: 20654.1308333896@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

John Rouillard <rouilj(at)renesys(dot)com> writes:
>> On Fri, Jun 17, 2011 at 12:32 PM, Kevin Grittner
>> Kevin(dot)Grittner(at)wicourts(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Shianmiin 2011-06-17 18:51:43 Re: Who is causing all this i/o?
Previous Message John Rouillard 2011-06-17 17:26:50 Re: archive_command vs. cp -i